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.
Notify on warning but show as OK (or hide) in dashboards?
Notify on warning but show as OK (or hide) in dashboards?
=================================================
Nagios XI 5.6.5 Enterprise
CentOS 6.10 (64-bit) VMware image
SSL implemented and forced, with exception for localhost
Nagios XI 5.6.5 Enterprise
CentOS 6.10 (64-bit) VMware image
SSL implemented and forced, with exception for localhost
Re: Notify on warning but show as OK (or hide) in dashboards
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:
however, this way you would never get notified.
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 $?
0Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Notify on warning but show as OK (or hide) in dashboards
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
Nagios XI 5.6.5 Enterprise
CentOS 6.10 (64-bit) VMware image
SSL implemented and forced, with exception for localhost
Re: Notify on warning but show as OK (or hide) in dashboards
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!