Let's say we have a hostgroup of 100 hosts, all of which are being monitored for service X. Let's say this service goes down across all hosts. Rather than receiving 100 separate alerts, I'd like to receive a single alert saying that "Service X is down for the entire hostgroup" or something. Is this possible with Nagios? How to implement it? I'm looking around online but not seeing this particular situation discussed.

EDIT: note that this is not a network-facing service, this is a local check done on each host. Specifically it is a check to see whether the local SSL cert is expired or not.

  • Typically Iwould expect such a service to loadbalanced and simply check the service name the end-user would use. Check the availability of the service, rather than the individual servers providing that service and tie your notifications to that. – HBruijn May 16 '16 at 21:58
  • @HBruijn that would work for customer-facing services, but the kind of service I'm talking about it is a local check on each host. - specifically whether the localhost SSL cert has expired or not. – Michael Martinez May 16 '16 at 22:07

I found something that for the most part satisfies what I was looking for. It's a nagios plugin called check_multi which aggregates a bunch of service and/or host checks together and produces a single notification based on some flexible criteria (logic) that you specify.


Why not write your own command/script that checks each server certificate, aggregates the data, and then alerts if a percentage of checks fail?

You can check Cert expiry with openssl from a command prompt:

echo | openssl s_client -connect google.com:443 2>/dev/null | openssl x509 -noout -dates

Loop through your servers in Bash and then set you exit status based on Bash arguments you pass to the script, then set this up as a Nagios command.

The beauty of Nagios is that you can create your own monitors, for whatever purpose.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.