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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...