Splunk Search

How to compare same field values at different times?

muralianup
Communicator

How can I do a comparison with values from same field at different times? The logs belongs to the same index/sourcetype. There's a field called lagtime which basically denotes how long it took to complete a process/action. Goal is to compare the lagtime at current time with lagtime in past 12 hours and display the results only if there is no match.

0 Karma

Masa
Splunk Employee
Splunk Employee

Can you give us sample logs?

0 Karma

sundareshr
Legend

Try this

... earliest=-12h@h | eventstats latest(lagtime) as currentlagtime | where currentlagtime!=lagtime | ...
0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

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