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!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...