Page 1 of 1
How to notify "Unknown" service events info through E-mail?
Posted: Mon Nov 18, 2019 8:04 am
by rthomas7
Does Nagios XI have the option of reporting NCPA agent communication failure? . In our environment one Linux server stopped responding however Nagios XI console had all its services marked as Uknkown and no alert was sent. I am trying to find out if notification can be configured to to send E-mails whenever Nagios CCM sees "Uknown" services
-Rony Thomas
Re: How to notify "Unknown" service events info through E-ma
Posted: Mon Nov 18, 2019 11:46 am
by lmiltchev
First off, was your host in a HARD DOWN state?
If the host is in hard non-OK state, notifications for services on this host won't be sent out.
https://assets.nagios.com/downloads/nag ... tions.html
If you want to be notified on "UNKNOWN" states, you should have it in defined in the "notification_options" directive (the "u" flag).
Example:
define service {
host_name myhost
service_description Agent Version
use mytemplate
check_command check_xi_ncpa_agent!-t 'mytoken' -P 5693 -M system/agent_version!!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
notification_options w,c,u,r,f,s,
notifications_enabled 1
contacts nagiosadmin
register 1
}
If you don't have this line at all in your config, most probably the service is configured to send notifications on ALL states.
There is a filter for "xi users" (not "contacts only"), which can be applied too. Users can modify their notification preferences (click on the username in the upper-right corner, then click on "Notification Preferences" under "Notification Options"). They can select/deselect the "Service Unknown:" check-boxes, so even if the service is configured to send emails on UNKNOWN states, a user may not receive the email. You need to keep this in mind. Read more on "contacts" and "xi users" here:
https://assets.nagios.com/downloads/nag ... ntacts.pdf
Re: How to notify "Unknown" service events info through E-ma
Posted: Tue Nov 19, 2019 9:35 am
by rthomas7
I am not sure if this helps, This is what I see on one of the Nagios servers. Am I looking at the correct file?
# grep notification_options /home/svcanagios/NagiosXI/nagiosxi-55/subcomponents/nagioscore/mods/cfg/objects/templates.cfg
service_notification_options w,u,c,r,f,s ; send notifications for all service states, flapping events, and scheduled downtime events
host_notification_options d,u,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime events
notification_options d,u,r ; Only send notifications for specific host states
notification_options d,r ; Only send notifications for specific host states
notification_options d,r ; Only send notifications for specific host states
notification_options d,r ; Only send notifications for specific host states
notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
-Rony
Re: How to notify "Unknown" service events info through E-ma
Posted: Tue Nov 19, 2019 10:13 am
by lmiltchev
Unfortunately, this doesn't help. Perhaps you are showing me a template from your "install" directory... This is not going to be something that Nagios XI is currently using. Please, review our documentation on configuring email and text notifications here:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Check the service, service templates, and contacts configurations in the Core Config Manager. Let us know if you have any further questions.