Knowledge Management

collecting data from kvstore to index

mintucs
New Member

while i am collecting from kv store to index

|inputlookup amkc | collect index="game"

the index having time as current time how could we can sync _time with kv store time field

Tags (1)
0 Karma

somesoni2
Revered Legend

Create a field _time explicitly, and assigned the epoch value of your kv time field.

If your timeField from kvstore is already in epoch format, try like this

|inputlookup amkc | eval _time=timeField | collect index="game"

If your timeField from kvstore is no in epoch format, use strftime function to do so, like this (assuming string time format of field timeField is %Y-%m-%d %H:%M:%S, update the same per your format)

|inputlookup amkc | eval _time=strftime(timeField,"%Y-%m-%d %H:%M:%S") | collect index="game"
0 Karma
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...