Splunk Search

How to use a field in lookup table as search count

ahuihou
New Member

I have a lookup table with 3 fields/columns: Service, Priority, Threshold. If the search on service count is > (value of Threshold in lookup table) then send an alert.

Service Priority Threshold
Output P2 25
Input P3 10
Both P2 35

If search result > Threshold then send alert. What would my search look like?
index=xxx service=* | lookup tablename Service OUTPUT Service, Priority, Threshold | stats count by Service Threshold
if count is > Threshold

Tags (1)
0 Karma

nickhills
Ultra Champion

looks good, but use |where count>threshold

If my comment helps, please give it a thumbs up!
0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...