Alerting

i have four servers and how to send alert when servers is down using inputlookup?

karthi2809
Builder

created lookup xx.csv i added four servers in the lookup file

| inputlookup xx.csv | eval count=0| table Host count| append [search[| inputlookup xx.csv]| stats count by Host]| stats sum(count) as Count by Host| where Count = 0
Tags (2)
0 Karma

woodcock
Esteemed Legend

Like this:

| metadata type=hosts index=<YourIndexName>
| appendpipe [|inputlookup xxx.csv | eval lastTime = 0]
| dedup host
| eval lastDataDuration=(now()-lastTime)/60
| where lastDataDuration>YourThreshHoldIntegerNumberOfMinutesHere

niketn
Legend

There could be several streamlined methods of finding out if a host is down or is not sending events. Following are couple of those:

Using metadata command for scenario where your Host is running but Data is not getting in to SPLUNK (Created alert for a periodic schedule and time range like last 15 min etc)

| metadata type=hosts index=_internal
| eval lastEventDuration=(now()-lastTime)/60
| where lastDuration>15

Using REST API (provided you have access) for situation where host itself is down which would stop pinging Splunk server:

| rest /service/deployment/server/clients
| eval lastPingDuration=(now()-lastTime)/60
| where lastPingDuration>15
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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