Page 1 of 1

Nagios hosttemplate inheritance

Posted: Sun Oct 27, 2019 10:58 am
by grayloglearn
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.

Re: Nagios hosttemplate inheritance

Posted: Tue Oct 29, 2019 3:18 pm
by mbellerue
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.