Nagios hosttemplate inheritance

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

Nagios hosttemplate inheritance

Postby grayloglearn » Sun Oct 27, 2019 10:58 am

Hi Team,

I want to implement "A" template inheritance to "B" Template.

Step 1) I have created the cpu_load, memory services and added to " C" Hostgroup.
Step 2) I have created the httpd,mysqld services and added to "D" Hostgroup.

step 3) I will create one host template "resouces" and used "generic-host_template" and "C" hostgoup added(cpu_load, memory) to resouces template.
Now i created Testing1 host and added "resource" template to Testing1 host (then automatically cpuload,memory services will add to Testing1 host)

step 4) I will create one host template that is "services_status" and used "generic-host_template" and "D" hostgoup added( httpd,mysqld)
Now i created Testing2 host and added "services_status" template to Testing2 (then automatically httpd,mysqld services will add to Testing2 host)

Now my intention is "resource" template services should inherit to "service_status" template

While i am adding the new host i add the Service_status template then (cpuload, memory,httpd,mysqld) Services should add to Testing2 server.
grayloglearn
 
Posts: 173
Joined: Thu Jul 06, 2017 8:55 am

Re: Nagios hosttemplate inheritance

Postby mbellerue » Tue Oct 29, 2019 3:18 pm

I don't see why this wouldn't work. There is a document on object inheritance from the Nagios Core perspective. That should give the nitty gritty on how this all works.
https://assets.nagios.com/downloads/nag ... tance.html

I think the most relevant section for you is going to be Inheritance Chaining.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
mbellerue
 
Posts: 875
Joined: Fri Jul 12, 2019 11:10 am


Return to Nagios XI

Who is online

Users browsing this forum: No registered users and 10 guests