Getting Data In

How to create an alert for the host not sending data for an hour using created index?

raja8220
New Member

Need to create alert for the host not sending data for 1 hour using created Index

Index=Cisco

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @raja8220 ,

as @adonio said there are hundreds of answers to this question!

so in few words you have to create a lookup (called e.g. perimeter.csv) containing the hosts to check: at least one column (called e.g. host) with the hostname.

then run a search like this:

| metasearch index=cisco
| eval host=lower(host)
| stats count BY host
| append [ inputlookup perimeter.csv | eval host=lower(host), count=0 | fields host count ]
| stats sum(count) AS total BY host
| where total=0

then schedule this search as an alert  with the frequency you like.

You can also use this search (cutting the last row) to display a situation of your infrastructure:

  • total=0 means that the systen isn't sending logs,
  • total>0 means that the systen is sending logs.

Ciao.

Giuseppe

0 Karma

adonio
Ultra Champion

joshi_rajesh
New Member

How about?

 

| inputlookup MyServerList.csv 
| eval totalCount=0 
| appendcols override=true 
    [| metadata type=hosts 
    | search 
        [| inputlookup MyServerList.csv 
            ] 
        ] 
| where totalCount = 0
0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...