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!
Tool to Calculate 'Effective' Config for a Host or Service?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Tool to Calculate 'Effective' Config for a Host or Servi
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
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:
Then the config for bighost2 would effectively be:
What I want 'to do' is see those calculated configs for a host or service.
Thanks!
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
}Code: Select all
define host{
host_name bighost2
check_command check-host-alive
notification_options d,u,r
max_check_attempts 3
}Thanks!
Re: Tool to Calculate 'Effective' Config for a Host or Servi
You can see the current, 'effective' objects by looking at the objects.cache file:
Code: Select all
less /usr/local/nagios/var/objects.cache
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Tool to Calculate 'Effective' Config for a Host or Servi
Great, thank you!
Would be nice to have it in the GUI, but I'm not complaining! I'll take it
Would be nice to have it in the GUI, but I'm not complaining! I'll take it