Splunk Search

How to print a change in value

tech_soul
New Member

Hi all,
Please help me to set an alert when a value change occurred.
Also, I need to print old and new values.

0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi tech_soul,
could you share more information about your data?
especially if the value to check is continously logged or it appears only one time in a period.

Anyway, I suppose that the value to check is continously logged, try something like this:

index=my_index earliest=-5m latest=now
| stats dc(check_field) AS check
| where check=1

Bye.
Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi tech_soul,
could you share more information about your data?
especially if the value to check is continously logged or it appears only one time in a period.

Anyway, I suppose that the value to check is continously logged, try something like this:

index=my_index earliest=-5m latest=now
| stats dc(check_field) AS check
| where check=1

Bye.
Giuseppe

Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...