Alerting

How to write a search to alert if one host stops forwarding logs for a certain sourcetype?

rikufu
New Member

Hello guys,

I want to make an alert if number of hosts is lower than 5 in a sourcetype search.
To be more specific, I have 5 hosts that send logs into sourcetype=test. If one of the hosts stops publish logs into this sourcetype for the last 30 minutes, I would like to get an alert for it.

I'll be glad if you can help me.

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

This search should get you started.

sourcetype=test earliest=-30m | dedup host 

One you have the search returning the desired results (one record for each host that reported in the last 30 minutes), save it as an alert and set the alert to trigger when the number of results is less than 5.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

This search should get you started.

sourcetype=test earliest=-30m | dedup host 

One you have the search returning the desired results (one record for each host that reported in the last 30 minutes), save it as an alert and set the alert to trigger when the number of results is less than 5.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...