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.
Object Inheritance - Host groups and Service Templates
Re: Object Inheritance - Host groups and Service Templates
Are you asking if you can have different warning and critical thresholds for the sharepoint_hg?
Or are you trying to do service escalations?
https://assets.nagios.com/downloads/nag ... tions.html
Or are you trying to do service escalations?
https://assets.nagios.com/downloads/nag ... tions.html
Re: Object Inheritance - Host groups and Service Templates
If you added the "CPU Usage" service to any hostgroup, i.e. "win_hg" , the service will inherit the contactgroups, defined on each host, member of "win_hg" via "implied inheritance" unless you defined contacts/contactgroups implicitly on the service level.
https://assets.nagios.com/downloads/nag ... tance.html
https://assets.nagios.com/downloads/nag ... tance.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Object Inheritance - Host groups and Service Templates
Gotcha... Let me test this. I've the read attached doc, and using inheritance (chaining) for host.
Will let you know. Thank you!!
Will let you know. Thank you!!
Re: Object Inheritance - Host groups and Service Templates
brdr wrote:Gotcha... Let me test this. I've the read attached doc, and using inheritance (chaining) for host.
Will let you know. Thank you!!
Sounds good!
Let us know what happens.
Former Nagios Employee.
me.
me.