Splunk Search

How do you turn minute offset columns into timestamps?

gbronner_rbc
Explorer

I've got a csv file that looks like this:

Key, Description1, 0, 1,2, 3, 4, 5, 6,7,8,9,10
A , Description of A, value at midnight, value at 1201....

How does one turn this into a series of events of the form

_timestamp(1200), A, Description of A, value at midnight
_timestamp(1201),A, Description of A, value at 1201

etc...

0 Karma

somesoni2
Revered Legend

Try Something like this (might have to tweak the timestamp calculation

Your base search to get data from CSV | eval temp=Key."##".Description1 | fields - Key,Description1 | untable temp Timestamp Value | rex field=temp "(?<Key>.*)##(?<Description1>.*)" | fields - temp | eval Timestamp=now() + Timestamp*60 | convert ctime(Timestamp) | table Timestamp Keay Description Value
0 Karma
Get Updates on the Splunk Community!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...