Deployment Architecture

How to check missing universal forwarders

Rocky31
Path Finder

Any help will be appreciated, i trying from long back how to check missing forwarders.

Tags (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi Rocky31,
In the Splunk Distributed Management Console there is an alarm for the missed forwarders to enable.

Otherwise you could creste a lookup (e.g. called perimeter.csv with a field called host) with the list of all forwarders to check and schedule an alarm with this search (e.g. every five minutes):

index=_internal
| eval host=upper(host)
| stats count by host
| append [ | inputlookup perimeter.csv | eval host=upper(host), count=0 | fields host count ]
| stats sum(count) AS Total by host
| where Total=0

In this way you have all the hosts of your lookup that didn't send logs to the Indexers in the period, so you can enable an alarm that sends an email or different actions.

Using the same search (without the last low) you can build a dashboard that shows the status of your forwarders that you can also display in graphic mode.

Bye.
Giuseppe

View solution in original post

0 Karma

inventsekar
SplunkTrust
SplunkTrust

Please check these search queries -

The following search works in 3.4.5 and finds all hosts who haven't sent a message in the last 24 hours

| metadata type=hosts | eval age = strftime("%s","now") - lastTime | search age > 86400 | sort age d | convert ctime(lastTime) | fields age,host,lastTime

and in 4.0:

| metadata type=hosts | eval age = now() - lastTime | search age > 86400 | sort age d | convert ctime(lastTime) | fields age,host,lastTime

Another 4.0 variant

| metadata type=hosts | sort recentTime desc | convert ctime(recentTime) as Recent_Time

http://wiki.splunk.com/Community:HowToFindLostForwarders

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi Rocky31,
In the Splunk Distributed Management Console there is an alarm for the missed forwarders to enable.

Otherwise you could creste a lookup (e.g. called perimeter.csv with a field called host) with the list of all forwarders to check and schedule an alarm with this search (e.g. every five minutes):

index=_internal
| eval host=upper(host)
| stats count by host
| append [ | inputlookup perimeter.csv | eval host=upper(host), count=0 | fields host count ]
| stats sum(count) AS Total by host
| where Total=0

In this way you have all the hosts of your lookup that didn't send logs to the Indexers in the period, so you can enable an alarm that sends an email or different actions.

Using the same search (without the last low) you can build a dashboard that shows the status of your forwarders that you can also display in graphic mode.

Bye.
Giuseppe

0 Karma

somesoni2
Revered Legend

What exactly you want to check? Forwarder not sending data?

0 Karma

Rocky31
Path Finder

i want to check whether it is up and running or sending data, just like i want to diagnose

0 Karma

somesoni2
Revered Legend

Do you've DMC setup in your instance? It does have dashboards for forwarder monitoring.
http://docs.splunk.com/Documentation/Splunk/6.6.1/DMC/ForwardersDeployment

Other option is, unless you disable, the forwarder will send it's internal log events, so you can check whether you're receiving that. No event means Fwd not running OR not sending data.

index=_internal sourcetype=splunkd host=YourFwdName earliest=-15m

Another option is, if you're using deployment server to configure apps on your forwarders, you can check the phonehome events. See this for search for phonehome events
https://answers.splunk.com/answers/208607/how-to-determine-if-forwarder-is-phoning-home-to-d.html

0 Karma
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!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

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 ...