send service alert using two different service templates
Posted: Tue Jan 15, 2019 11:03 pm
I have the below service templates defined, and I would like to use both of them for the same service. The first one would be used for a status of critical and the second one would be used for a status of warning. I also included the service definition.
Is it possible to do this, and if so, how would I set it up?
define service {
name nrpe_db_service_prod_critical
check_command check_nrpe!!!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 0
notification_period 24x7-Prod
notification_options c,
notifications_enabled 1
contact_groups dbas_service_prod_critical
register 0
}
define service {
name nrpe_db_service_prod_warning
check_command check_nrpe!!!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period 24x7-Prod
notification_options w,
notifications_enabled 1
contact_groups dbas_service_prod_warning
register 0
}
define service {
host_name adcdeXXX
service_description DB tablespace
use nrpe_db_service_prod_warning
check_command check_nrpe!check_tablespace!-a 'xxxxx3'!!!!!!
contact_groups +dbas_service_prod_critical
_graphiteprefix nagios.perfdata
_xiwizard nrpe
register 1
}
Is it possible to do this, and if so, how would I set it up?
define service {
name nrpe_db_service_prod_critical
check_command check_nrpe!!!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 0
notification_period 24x7-Prod
notification_options c,
notifications_enabled 1
contact_groups dbas_service_prod_critical
register 0
}
define service {
name nrpe_db_service_prod_warning
check_command check_nrpe!!!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period 24x7-Prod
notification_options w,
notifications_enabled 1
contact_groups dbas_service_prod_warning
register 0
}
define service {
host_name adcdeXXX
service_description DB tablespace
use nrpe_db_service_prod_warning
check_command check_nrpe!check_tablespace!-a 'xxxxx3'!!!!!!
contact_groups +dbas_service_prod_critical
_graphiteprefix nagios.perfdata
_xiwizard nrpe
register 1
}