Notify on warning but show as OK (or hide) in dashboards?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gmackey
Posts: 35
Joined: Wed Mar 22, 2017 1:13 pm
Location: Edmond, OK
Contact:

Notify on warning but show as OK (or hide) in dashboards?

Post by gmackey »

I'm wondering whether I can configure a service to notify when it reaches the warning threshold but to otherwise report as OK when viewing the service within Nagios XI? Here is the use case, so maybe someone can provide a recommendation.

This is for SSL cert expiration monitoring. We have two monitors for each cert. One monitor notifies at 90 days, 60 days, and 30 days before expiration. The other monitor notifies at 30 days and then every day thereafter. We would like the 90/60/30 monitor to be configured in a way that it sends notifications at those thresholds but otherwise always appears green in OK status when viewing in Nagios XI. Alternatively, it could just not show up at all when viewing services in Nagios XI and that would be fine as long as notifications are sent and we can still manage settings via XI CCM. This is so that there aren't a bunch of SSL certificates in the 30-90 day period before expiration cluttering up Nagios XI with warnings we don't want to see, making it harder to keep track of the ones we want.

Thank you for any input you can provide to help us with this.
=================================================
Nagios XI 5.6.5 Enterprise
CentOS 6.10 (64-bit) VMware image
SSL implemented and forced, with exception for localhost
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Notify on warning but show as OK (or hide) in dashboards

Post by lmiltchev »

It is not possible to "fake" the exit code and the output of the plugin to "OK" AND send a notification at the same time. Nagios hasn't been designed to do so... You could negate the check results by using the negate plugin:

Code: Select all

/usr/local/nagios/libexec/check_http -H www.nagios.com -C 400 -p 443
SSL WARNING - Certificate '*.nagios.com' expires in 307 day(s) (2020-06-10 18:59 -0500/CDT).

echo $?
1

/usr/local/nagios/libexec/negate -w OK -s /usr/local/nagios/libexec/check_http -H www.nagios.com -C 400 -p 443
SSL OK - Certificate '*.nagios.com' expires in 307 day(s) (2020-06-10 18:59 -0500/CDT).

echo $?
0
however, this way you would never get notified.
Be sure to check out our Knowledgebase for helpful articles and solutions!
gmackey
Posts: 35
Joined: Wed Mar 22, 2017 1:13 pm
Location: Edmond, OK
Contact:

Re: Notify on warning but show as OK (or hide) in dashboards

Post by gmackey »

Thank you for the information. I suspected this might be the case. We'll just have to try to get people to update their certs sooner! :)
=================================================
Nagios XI 5.6.5 Enterprise
CentOS 6.10 (64-bit) VMware image
SSL implemented and forced, with exception for localhost
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Notify on warning but show as OK (or hide) in dashboards

Post by mbellerue »

We wish you luck in getting and keeping those certs updated! It's not always the easiest of tasks. Closing thread.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked