Object Inheritance - Host groups and Service Templates
Posted: Wed Aug 12, 2015 10:42 am
Hi, we use Nagios XI2014R2.7
We have implemented object inheritance at the host level and now want to implement inheritance at the service evel. I've read the Nagios Core Object Inheritance ddoc and a couple of posts. I have not figured out to use at the service level when using host groups.
Scenario
I'm adding a new host 'bd-940-40'. It belongs to a windows host and sharepoint host groups within the host definition. I want to update the service 'CPU Usage' service to include sharepoint_hg where 'Windows Admins Contact Group' and 'Sharepoint Admins Contact Group' get notified when threshold is reached. Below is the service template for windows team that have check and alert settings (contact group) and I need to create a new one for alerting only for sharepoint admins. Can i use a single service check to handle this situation?
define host {
host_name bd-940-40
use win_host_ping_ht,sharepoint_host_ping_ht
alias Sharepoint Test DB
address x.x.x.x
parents cisco_01
hostgroups sharepoint_hg,win_bed_hg,win_hg
register 1
}
define service {
service_description CPU Usage
use win_base_metrics_st
hostgroup_name win_bed_hg,win_bos_hg
check_command check_wmi_mode_only!checkcpu -w 98 -c 99!!!!!!!
register 1
}
define service {
name win_base_metrics_st
service_description Windows OS Metrics Service Template
max_check_attempts 5
check_interval 5
retry_interval 6
check_period 24x7
notification_interval 1440
notification_period 24x7
notification_options w,c,r,f,s,
notifications_enabled 1
contact_groups win_cg
register 0
}
Many thanks.
We have implemented object inheritance at the host level and now want to implement inheritance at the service evel. I've read the Nagios Core Object Inheritance ddoc and a couple of posts. I have not figured out to use at the service level when using host groups.
Scenario
I'm adding a new host 'bd-940-40'. It belongs to a windows host and sharepoint host groups within the host definition. I want to update the service 'CPU Usage' service to include sharepoint_hg where 'Windows Admins Contact Group' and 'Sharepoint Admins Contact Group' get notified when threshold is reached. Below is the service template for windows team that have check and alert settings (contact group) and I need to create a new one for alerting only for sharepoint admins. Can i use a single service check to handle this situation?
define host {
host_name bd-940-40
use win_host_ping_ht,sharepoint_host_ping_ht
alias Sharepoint Test DB
address x.x.x.x
parents cisco_01
hostgroups sharepoint_hg,win_bed_hg,win_hg
register 1
}
define service {
service_description CPU Usage
use win_base_metrics_st
hostgroup_name win_bed_hg,win_bos_hg
check_command check_wmi_mode_only!checkcpu -w 98 -c 99!!!!!!!
register 1
}
define service {
name win_base_metrics_st
service_description Windows OS Metrics Service Template
max_check_attempts 5
check_interval 5
retry_interval 6
check_period 24x7
notification_interval 1440
notification_period 24x7
notification_options w,c,r,f,s,
notifications_enabled 1
contact_groups win_cg
register 0
}
Many thanks.