Notification of Service as a Warning

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
gregbeyer
Posts: 181
Joined: Fri Sep 11, 2020 2:13 pm

Notification of Service as a Warning

Post by gregbeyer »

Hello, we would like to change how certain services are notified. At present all notified service checks notify with subject line including "CRITICAL" along with the check name and host. But some check failures, aren't really "CRITICAL" per se. They're good to know about, and we still want push notification to email, but "WARNING" is more appropriate in the email subject line for particular checks.

Have I fixed this by simply changing, in Service Management / Alert Settings, selecting Warning and un-selecting Critical? Or, as I suspect, does this merely mean alert on Warning? And since my service check results are either OK or not (CRITICAL), will I miss what I want to be notified of?

Thanks for clarifying.
kg2857
Posts: 490
Joined: Wed Apr 12, 2023 5:48 pm

Re: Notification of Service as a Warning

Post by kg2857 »

You can use the negate plugin to change from critical to warning.
gregbeyer
Posts: 181
Joined: Fri Sep 11, 2020 2:13 pm

Re: Notification of Service as a Warning

Post by gregbeyer »

Very interesting, thanks for that! I read the documentation a https://assets.nagios.com/downloads/nag ... n-2024.pdf
Negate can change a critical to OK or an OK to critical -- so switch between the two ends of the spectrum so to speak. But not seeing how to change a critical to warning -- the intermediate condition.

Something else I came across in researching a solution is event handlers. Wonder if I could clone, then create a special event handler only to be used for these service checks that should be warn, instead of critical? Maybe xi_service_event_handler or xi_service_notification_handler. Then manipulate or hard code servicestate=$SERVICESTATE$ or servicestatetype=$SERVICESTATETYPE$ to get what I want. But would I mess up the email notification in doing this? Can't find documentation on these so far, so kinda feeling in the dark.
kg2857
Posts: 490
Joined: Wed Apr 12, 2023 5:48 pm

Re: Notification of Service as a Warning

Post by kg2857 »

Check again...
-o, --ok=STATUS
-w, --warning=STATUS
-c, --critical=STATUS
-u, --unknown=STATUS
STATUS can be 'OK', 'WARNING', 'CRITICAL' or 'UNKNOWN' without single
quotes. Numeric values are accepted. If nothing is specified, permutes
OK and CRITICAL.
Post Reply