Splunk Search

combining delta/where searches

tedder
Communicator

These searches: index=foo | delta a as a_delta | where a_delta < 0 index=foo | delta b as b_delta | where b_delta < 0 index=foo | delta c as c_delta | where c_delta < 0 index=foo | delta d as d_delta | where d_delta < 0

I'm combining them like the following:

index=foo | delta a as a_delta | delta b as b_delta | delta c as c_delta | delta d as d_delta | where a_delta < 0 OR b_delta < 0 OR c_delta < 0 OR d_delta < 0

Is there an easier way to do this?

Note a,b,c,d have different values; they can't and shouldn't be compared against each other.

As a bonus, it would be nice to identify which of the fields doesn't match. My combination only shows that they don't match, not that it is field "c" that is the culprit.

0 Karma

lguinn2
Legend

I assume that you want to trigger an alert if you get a negative delta for any of the fields. But I'm not clear on why you need to combine the searches.

If the search is slow because there is a lot of data, I suggest that you run it more often. For example, if it is running every hour, run it every 15 minutes instead. Also, is there any way that you could further restrict this search, instead of just searching index=foo? Do the fields a, b, c and d appear in every event in the foo index?

If you run 4 searches instead of a single search, you will be able to set your alert text to easily see which field has gone wacky.

Please correct me if I don't understand the issue,

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!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...