Page 1 of 1

Only one template applying to my hosts

Posted: Fri Aug 04, 2017 12:46 pm
by ejlorson
Nagios XI eval running on AWS xlarge instance

I have two host templates for a device - one an SSH up/down test and one is an SNMP poll for OctetsOut on an interface. Both templates work when tested.

I applied both of these templates to a host, BUT only the first one in the list runs - the second one is ignored, no matter what. I switched the order and confirmed that it is doing this. Why? How do I get all the templates associated with a host to run all the time?

Re: Only one template applying to my hosts

Posted: Fri Aug 04, 2017 12:54 pm
by dwhitfield
How are you creating and applying these templates? Can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.

Re: Only one template applying to my hosts

Posted: Fri Aug 04, 2017 1:33 pm
by ejlorson
Sorry, I cannot post the profile - I work in a secured environment, and there is too much I would have to strip out.

This is still an eval so my settings are simple..

I am creating the profiles in CCM -> Templates -> Host Templates, and testing the templates using the 'Run Check Command'
I add the Host Template to the host group using the 'Manage Host Groups' button.

At this point, whichever template is on top will show up in the Host Details graph.

Then, I go to Hosts, pick the Host, then go to 'Manage Templates' I change the order of the templates and they swap - the one on top is visible and the one below goes away.

Re: Only one template applying to my hosts

Posted: Fri Aug 04, 2017 2:24 pm
by dwhitfield
Please post the host config associated with this host. It should be located in /usr/local/nagios/etc/hosts.

Right now, it sounds like there is an issue with applying the templates to graphing, not applying templates more globally. That's what I'm trying to tease out from the config. The objects.cache file would also be useful, but I suspect if you aren't able to give a profile you aren't able to get that either.

Re: Only one template applying to my hosts

Posted: Mon Aug 07, 2017 7:45 am
by ejlorson
Thanks. I will pull this info and see if I can redact it well enough to post, but I won't be able to until tomorrow.

Re: Only one template applying to my hosts

Posted: Mon Aug 07, 2017 3:01 pm
by dwhitfield
ejlorson wrote:I won't be able to until tomorrow.
No problem, we'll be here!

Re: Only one template applying to my hosts

Posted: Fri Sep 29, 2017 8:53 am
by ejlorson
I figured this out myself. I did not have a good understanding of how services relate to hosts. You can lock this one up.

Re: Only one template applying to my hosts

Posted: Fri Sep 29, 2017 9:15 am
by kyang
Sounds good! Glad you figured this out!
Thanks for using the Nagios Support Forums!

Re: Only one template applying to my hosts

Posted: Fri Sep 29, 2017 9:30 am
by scottwilkerson
ejlorson wrote:I figured this out myself. I did not have a good understanding of how services relate to hosts. You can lock this one up.

Glad to hear it is resolved. Locking thread