Unable to hide a service from a contact
Posted: Thu Nov 14, 2013 10:47 am
Hi All,
System Setup
Nagios 3.4.1
OS - Redhat Enterprise Linux 5.9
Plugins 1.4.16
Heres my problem.
The DBA team have 3 types of Nagios alerts that they would like to be changed so that only the DBA team are alerted when the thresholds are triggered. Currently when these alerts are triggered Monitor also receive the alerts. There is no support reason that Monitor need to be alerted about these. The alerts are purely for the DBA team and have no impact to any Production services.
An example of one of the service checks we would like the Monitor team not to see - Archive Log Backups
I have tried using contact_groups null but this does not work as the alert still shows in Nagios.
I suppose what i actually need to do is remove Monitor as an inherited contact against these services.
I create a service db-service which is used as a template against all the services deployed below it.
#db-services.cfg
define service {
name db-service
use base-service
contact_groups dbas,monitor
notification_options c,r
check_interval 5
max_check_attempts 3
retry_check_interval 1
notification_interval 30
notification_period 24x7
register 0
}
I also created a template db1-service which does not have monitor specified in it
#service template that does not use monitor in its contact group
define service {
name db1-service
use base-service
contact_groups dbas
notification_options c,r
check_interval 5
max_check_attempts 3
retry_check_interval 1
notification_interval 30
notification_period 24x7
register 0
}
Following this approach i can still see my service under a user that should have no rights to it
The top level servicedefinition is as follows
###############################################################################
###############################################################################
#
# MASTER SERVICE TEMPLATE - All services are derived from this initial template
#
###############################################################################
###############################################################################
define service {
name base-service
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
notification_interval 30
notification_period workhours
notification_options w,u,r,c,s
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
check_interval 5
max_check_attempts 5
retry_check_interval 1
contact_groups admins
action_url /pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$
register 0
}
And my actual service i am trying to hide from the Monitor user is as follows
define service{
use db1-service
host_name psvuk1lora101
service_description Archive Log Backups - dbasename
display_name Archive Log Backups - dbasename
icon_image heartbeat.png
check_command check_nrpe_120!check_oracle!noArclogBackups!dbasename!dbasename
}
Any help on why this is not hiding the above service from the Monitor user would be welcome.
I have tried this on several browsers sho have rulled out caching i believe.
System Setup
Nagios 3.4.1
OS - Redhat Enterprise Linux 5.9
Plugins 1.4.16
Heres my problem.
The DBA team have 3 types of Nagios alerts that they would like to be changed so that only the DBA team are alerted when the thresholds are triggered. Currently when these alerts are triggered Monitor also receive the alerts. There is no support reason that Monitor need to be alerted about these. The alerts are purely for the DBA team and have no impact to any Production services.
An example of one of the service checks we would like the Monitor team not to see - Archive Log Backups
I have tried using contact_groups null but this does not work as the alert still shows in Nagios.
I suppose what i actually need to do is remove Monitor as an inherited contact against these services.
I create a service db-service which is used as a template against all the services deployed below it.
#db-services.cfg
define service {
name db-service
use base-service
contact_groups dbas,monitor
notification_options c,r
check_interval 5
max_check_attempts 3
retry_check_interval 1
notification_interval 30
notification_period 24x7
register 0
}
I also created a template db1-service which does not have monitor specified in it
#service template that does not use monitor in its contact group
define service {
name db1-service
use base-service
contact_groups dbas
notification_options c,r
check_interval 5
max_check_attempts 3
retry_check_interval 1
notification_interval 30
notification_period 24x7
register 0
}
Following this approach i can still see my service under a user that should have no rights to it
The top level servicedefinition is as follows
###############################################################################
###############################################################################
#
# MASTER SERVICE TEMPLATE - All services are derived from this initial template
#
###############################################################################
###############################################################################
define service {
name base-service
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
notification_interval 30
notification_period workhours
notification_options w,u,r,c,s
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
check_interval 5
max_check_attempts 5
retry_check_interval 1
contact_groups admins
action_url /pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$
register 0
}
And my actual service i am trying to hide from the Monitor user is as follows
define service{
use db1-service
host_name psvuk1lora101
service_description Archive Log Backups - dbasename
display_name Archive Log Backups - dbasename
icon_image heartbeat.png
check_command check_nrpe_120!check_oracle!noArclogBackups!dbasename!dbasename
}
Any help on why this is not hiding the above service from the Monitor user would be welcome.
I have tried this on several browsers sho have rulled out caching i believe.