Getting Data In

what’s the best way to alert when a universal forwarder cant connect to the deployment server?

sbattista09
Contributor

what’s the best way to alert when a universal forwarder cant connect to the deployment server? I am looking to build a alert when a forwarder can not get the configuration from the deployment server. The built-in alert for the deployment monitor isn't quite what we are looking for. has anyone built there own that might be better?

0 Karma
1 Solution

gjanders
SplunkTrust
SplunkTrust

Here's two that might help which I use:
Application Installation Failures From Deployment Manager

index=_internal sourcetype=splunkd "action=Install result=Fail" | top limit=100 ip app | lookup dnslookup clientip as ip | table clienthost app ip

Splunk universal forwarders not talking to the deployment server:

| tstats count where index=_internal groupby host | fields host | table host | search NOT [search index=_internal host=ulpspl09* source="/opt/splunk/var/log/splunk/splunkd_access.log" sourcetype=splunkd_access | rex field=uri "/services/broker/phonehome/connection_[^_]+_[89][0-9]{3}_[^_]+(_[0-9][^_]+)?_(?P<hostname>[^_]+)_" | eval host=hostname | dedup host | table host] | lookup dnslookup clienthost AS host | search clientip!=''

The above determines when we have server sending data to be indexed but not talking to the deployment server.

View solution in original post

0 Karma

gjanders
SplunkTrust
SplunkTrust

Here's two that might help which I use:
Application Installation Failures From Deployment Manager

index=_internal sourcetype=splunkd "action=Install result=Fail" | top limit=100 ip app | lookup dnslookup clientip as ip | table clienthost app ip

Splunk universal forwarders not talking to the deployment server:

| tstats count where index=_internal groupby host | fields host | table host | search NOT [search index=_internal host=ulpspl09* source="/opt/splunk/var/log/splunk/splunkd_access.log" sourcetype=splunkd_access | rex field=uri "/services/broker/phonehome/connection_[^_]+_[89][0-9]{3}_[^_]+(_[0-9][^_]+)?_(?P<hostname>[^_]+)_" | eval host=hostname | dedup host | table host] | lookup dnslookup clienthost AS host | search clientip!=''

The above determines when we have server sending data to be indexed but not talking to the deployment server.

0 Karma

sbattista09
Contributor

hmmm.... Error in 'rex' command: Encountered the following error while compiling the regex '/services/broker/phonehome/connection_[^]+[89][0-9]{3}[^]+([0-9][^]+)?(?P[^]+)_': Regex: unrecognized character after (?P

0 Karma

sbattista09
Contributor

did it a little differently in the end, index=_internal sourcetype=splunkd component=DC:PhonehomeThread OR component=DC:DeploymentClient err=not_connected | stats count by host err component | where count >= 200

0 Karma

gjanders
SplunkTrust
SplunkTrust

Sorry about that, try the updated version! I'm guessing I missed something during the copy/paste...

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...