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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...