Page 1 of 1
Tool to Calculate 'Effective' Config for a Host or Service?
Posted: Fri Jul 19, 2013 2:33 pm
by kjhosein
Hello all,
I looked around my Nagios Core & Nagios XI interfaces, but can't find a mechanism or a tool that would show me or calculate the 'effective' config for a host or service. This would be particularly useful where you make use of templates, especially nested templates.
I searched through the Nagios Exchange, and as you can imagine, this is a tough thing to search for given the keywords!
Am I blind and if not, does such a tool exist?
Thanks!
Re: Tool to Calculate 'Effective' Config for a Host or Servi
Posted: Mon Jul 22, 2013 9:26 am
by slansing
I'm not quite sure what you mean by the 'effective' config for a host. Could you be a little more specific on what exactly you are looking for? Or to do?
Re: Tool to Calculate 'Effective' Config for a Host or Servi
Posted: Mon Jul 22, 2013 1:22 pm
by kjhosein
Taking an example out of
http://nagios.sourceforge.net/docs/3_0/ ... tance.html, let's say you have a couple of definitions where one 'uses' the other, template style:
Code: Select all
define host{
host_name bighost1
check_command check-host-alive
notification_options d,u,r
max_check_attempts 5
name hosttemplate1
}
define host{
host_name bighost2
max_check_attempts 3
use hosttemplate1
}
Then the config for bighost2 would effectively be:
Code: Select all
define host{
host_name bighost2
check_command check-host-alive
notification_options d,u,r
max_check_attempts 3
}
What I want 'to do' is see those calculated configs for a host or service.
Thanks!
Re: Tool to Calculate 'Effective' Config for a Host or Servi
Posted: Mon Jul 22, 2013 1:39 pm
by abrist
You can see the current, 'effective' objects by looking at the objects.cache file:
Code: Select all
less /usr/local/nagios/var/objects.cache
Re: Tool to Calculate 'Effective' Config for a Host or Servi
Posted: Mon Jul 22, 2013 1:43 pm
by kjhosein
Great, thank you!
Would be nice to have it in the GUI, but I'm not complaining! I'll take it
