when i enable logging in nagios.cfg i can see additional email based alerts going, but this custom one is never even attempted. Im not sure what im missing..
This is based on the following code --> https://github.com/mrmikee/nagios-notify-msteams
I have checked the commands below using the nagios user and they hit the url. I have also enabled email notifications on the same service and host and the email alerts work as expected. This custom alert is never attempted..
Nagios.log
Code: Select all
[1775488618] SERVICE NOTIFICATION: nagiosadmin;PB1;netbackup;CRITICAL;xi_service_notification_handler;CRITICAL: netbackup is stopped (should be running)
[1775488618] SERVICE ALERT: PB1;netbackup;CRITICAL;HARD;5;CRITICAL: netbackup is stopped (should be running)
[1775488912] SERVICE NOTIFICATION: nagiosadmin;PB1;netbackup;CRITICAL;xi_service_notification_handler;CRITICAL: netbackup is stopped (should be running)
[1775488912] SERVICE ALERT: PB1;netbackup;CRITICAL;HARD;5;CRITICAL: netbackup is stopped (should be running)
[1775489210] SERVICE NOTIFICATION: nagiosadmin;PB1;netbackup;CRITICAL;xi_service_notification_handler;CRITICAL: netbackup is stopped (should be running)
[1775489210] SERVICE ALERT: PB1;netbackup;CRITICAL;HARD;5;CRITICAL: netbackup is stopped (should be running)
[1775489508] SERVICE NOTIFICATION: nagiosadmin;PB1;netbackup;CRITICAL;xi_service_notification_handler;CRITICAL: netbackup is stopped (should be running)
[1775489508] SERVICE ALERT: PB1;netbackup;CRITICAL;HARD;5;CRITICAL: netbackup is stopped (should be running)
[1775489807] SERVICE NOTIFICATION: nagiosadmin;PB1;netbackup;CRITICAL;xi_service_notification_handler;CRITICAL: netbackup is stopped (should be running)
[1775489807] SERVICE ALERT: PB1;netbackup;CRITICAL;HARD;5;CRITICAL: netbackup is stopped (should be running)
[1775490106] SERVICE NOTIFICATION: nagiosadmin;PB1;netbackup;CRITICAL;xi_service_notification_handler;CRITICAL: netbackup is stopped (should be running)
[1775490106] SERVICE ALERT: PB1;netbackup;CRITICAL;HARD;5;CRITICAL: netbackup is stopped (should be running)
Code: Select all
define service {
host_name PB1
service_description netbackup
use xiwizard_ncpa_service
check_command check_xi_ncpa!-t 0REDACTEDa -P 5693 -M 'services' -q 'service=netbackup,status=running'!!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
flap_detection_enabled 0
notification_interval 1
first_notification_delay 1
notification_period xi_timeperiod_24x7
notification_options w,c,u,r,f,s,
notifications_enabled 1
contacts IOC-OUA,nagiosadmin
contact_groups IOC-CONTACT-GROUP
stalking_options o,w,c,u,N,
_xiwizard ncpa
register 1
}
Code: Select all
define contact {
contact_name IOC-OUA
alias IOC OUA User
contactgroups *
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r,f,s,n,
service_notification_options w,u,c,r,f,s,n,
host_notification_commands Soco-Notify-Ioc-Host
service_notification_commands Soco-Notify-Ioc-Service
retain_status_information 1
retain_nonstatus_information 1
email [email protected]Code: Select all
define command {
command_name Soco-Notify-Ioc-Host
command_line /home/nagios/scripts/to-isa-nagios/notify-nagios-ioc.py "HOST"
}
define command {
command_name Soco-Notify-Ioc-Service
command_line /home/nagios/scripts/to-isa-nagios/notify-nagios-ioc.py "SERVICE"
}