Getting Data In

New Forwarder Added

amN0P
Explorer

Is there a way of triggering an automated email alert whenever a NEW host(forwarder) starts sending logs to the Splunk Server.

Tags (1)
0 Karma
1 Solution

amN0P
Explorer

Thanks Vlad.

One more way of doing this..

| metadata index=index* OR index=main type=hosts | eval age = now()-lastTime | where age < 432000| sort age d | convert ctime(lastTime) | fields age,host,lastTime

Above search returns new forwarders added in the last 5 days.

View solution in original post

0 Karma

amN0P
Explorer

Thanks Vlad.

One more way of doing this..

| metadata index=index* OR index=main type=hosts | eval age = now()-lastTime | where age < 432000| sort age d | convert ctime(lastTime) | fields age,host,lastTime

Above search returns new forwarders added in the last 5 days.

0 Karma

reedmohn
Communicator

Doesn't this show all forwarders that have logged in the past 5 days?

0 Karma

Vladimir
Path Finder

Maybe it's not a right way but I used some similar query for alarm to check if I "lost" some hosts

index=my_index host earliest=-5m latest=now | dedup host | eval StatusBefore=1 | join type=left host [search index=my_index host earliest=-65m latest=-60m  | dedup host | eval StatusNow=1 ] | eval Status=if(StatusBefore=StatusNow,1,0) | table host, Status | where Status=0

This query do:

  • check available hosts for last 5 minutes
  • check available hosts for 5 minutes - 1 hour
  • compare two results (status = 1 - OK, status = 0 - new host)

Depending on your data polling interval you can set your own periods.

Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...