Object Inheritance - Host groups and Service Templates

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Object Inheritance - Host groups and Service Templates

Post by brdr »

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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Object Inheritance - Host groups and Service Templates

Post by ssax »

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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Object Inheritance - Host groups and Service Templates

Post by lmiltchev »

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
Be sure to check out our Knowledgebase for helpful articles and solutions!
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Re: Object Inheritance - Host groups and Service Templates

Post by brdr »

Gotcha... Let me test this. I've the read attached doc, and using inheritance (chaining) for host.

Will let you know. Thank you!!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Object Inheritance - Host groups and Service Templates

Post by hsmith »

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.
Locked