Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
I have a number of services for which I want notifications to go to a separate e-mail address instead of the nagiosadmin contact.
In conf.d/generic-services.cfg I have removed "contact_groups admins" from the generic service definition, and under it I made two service definitions for the normal services (aes-service) and the "updates" services for which another contact needs to be mailed.
define service{
name aes-service
use service
contact_groups admins
register 0
}
define service{
name updates-service
use service
contacts updates
register 0
}
This is working, with one problem: the updates services send notifications to both the updates contact, and the admin. Can I prevent e-mails going to the admin for these services?
define service{
name service ; The 'name' of this service template
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
is_volatile 0 ; The service is not volatile
check_period 24x7 ; The service can be checked at any time of the day
max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
retry_check_interval 5 ; Re-check the service every two minutes until a hard state can be determined
notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
notification_interval 1440 ; Re-notify about service problems every hour
notification_period 24x7 ; Notifications can be sent out at any time
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
action_url /nagios/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/nagios/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
; pnp4nagios integration
}
That would do it! Are you all set then, everything working properly?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.