Page 2 of 3

Re: Host groups and templates

Posted: Tue May 14, 2013 1:31 am
by eko
Excuse me for not replying anymore, I had a 2-week springbreak and forget to tell this here.

There is no mysql.log, only a mysqld.log. When I execute the command it says 'loaded 0 events'. Is this what you need to know?

Re: Host groups and templates

Posted: Tue May 14, 2013 9:58 am
by slansing
Can you go through and run the following commands, let us know what the outcome is from your end from running them, and if they had any effect, thanks!:

Code: Select all

service nagios stop
killall -9 nagios
service ndo2db stop
service ndo2db start
service nagios start

Re: Host groups and templates

Posted: Fri May 17, 2013 1:41 am
by eko
Sadly, they did not had any effect...

Re: Host groups and templates

Posted: Fri May 17, 2013 2:41 pm
by sreinhardt
Can you pm one of us a copy of your latest snapshot please? It would really help to see how this has been implemented opposed to just theoretical.

Re: Host groups and templates

Posted: Fri May 17, 2013 2:41 pm
by abrist
You mysqld log should be more verbose than that. Lets try it again (use code wraps):

Code: Select all

tail -25 /var/log/mysqld.log
And lets also check the status of mysqld:

Code: Select all

service mysqld status
And make sure only 1 parent exists:

Code: Select all

ps -aef | grep mysqld

Re: Host groups and templates

Posted: Tue May 21, 2013 2:39 am
by eko
I've send a snapshot to sreinhardt.

Re: Host groups and templates

Posted: Tue May 21, 2013 10:52 am
by sreinhardt
Looking at your configs, I can see that they are from today\last night, however I don't see the penta host or service template defined on any host or service that I have checked. It also does not appear to be on the groups created. Could you provide 2-3 specific examples of ones that this should be defined for.

Re: Host groups and templates

Posted: Wed May 22, 2013 7:31 am
by eko
I added the Penta Switches template to MW Switches Template, which has the MW Switches hostgroup defined.

I have not defined any template directly to a host or service. When I do this it works, but this shouldn't be necessary I've been told here?

Re: Host groups and templates

Posted: Thu May 23, 2013 11:03 am
by sreinhardt
I worked through this, and it took a moment to realize what is wrong. While you can and it is suggested to stack templates, and the effects of stacking should show in all hosts\services that use them. The issue comes from the logic of applying a hostgroup to a template, then applying the hosts to the hostgroup and expecting it to inherit.

What is actually happening, the template is told to apply the defined hostgroup to everything that uses the template, not for the hostgroup to inherit checks and settings from the templates. So instead you need to apply the settings such as host groups and other templates the a template, then apply this template directly to the host or service and all groups and other settings will trickle down. Does that make sense, I understand its a tricky topic.

Re: Host groups and templates

Posted: Fri May 24, 2013 4:34 am
by eko
I think I understand you, it means I have to go to each and every host and define a template, right?

As said, if I do this, it works. The only drawback is if I ever need to apply a different template to a bunch of hosts, it will take quite a bit of time (as I don't have the bulk modification option).

Thanks a lot for your time and effort sreinhardt!