Splunk Search

How to index a field where identical values have different values for ID?

AlexeyPy
Engager

How to index the same field "A" different values for the unique ID? A set of field "A" values is finite and for each ID can have multiple identical field values.

After a few search strings I have a table. I try to explain by img:

alt text

My main difficulty that I can't calculate the time difference between any two points of the field "A", because there are the same field "A" values. I think that this way will help me.

0 Karma

lfedak_splunk
Splunk Employee
Splunk Employee

Hey @AlexeyPy, If DalJeanis solved your problem, please don't forget to accept an answer! You can upvote posts as well. (Karma points will be awarded for either action.) Happy Splunking!

0 Karma

DalJeanis
Legend

Try this...

 | sort 0 _time ID fieldA
 | streamstats current=f last(_time) as priortime by ID fieldA
 | eval duration=coalesce(_time - priortime,"No prior")
0 Karma

AlexeyPy
Engager

Unfortunately, that's not what I need. I need to be able to calculate the difference in time between those points, which I want. In this search only between the first and last in the group

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