Installation

How to create a script that will help me to know each devices that are not sending logs?

pacifikn
Communicator

Greetings!

Kindly Dear Team, Kindly help on how to create a script / Alert in Splunk that will help me to know the devices that are not sending logs?

I usually use query to know the device that are not sending logs but i need that we could get message alert for each device that are not sending logs.

>Manually:

index: xxx   earliest=1 | stats latest(_time) as _time count by host.

I would like to get the alert or if there's another way I get alert all the devices that are not sending logs/receiving its logs. kindly help me?

Thank you in advance.

Labels (2)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @pacifikn,

if you see in the Monitoring Console, you can find this search.

Anyway, if you want your own, you should create a lookup (called e.g. perimeter.csv) containing the list of hosts to monitor (aftel I'll describe this point) and run a search like this:

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

About the perimeter.csv lookup, you can manually manage it (and I hint this) or automatically rebuild every night scheduling a search.

Ciao.

Giuseppe

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...