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
SplunkTrust
SplunkTrust

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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...