Closed ramiro closed 10 years ago
I've seen this too. I thought it had something to do with some hack in my setup and hadn't bothered to track it down. My way to reproduce the use linux-server
issue:
okconfig addhost somehost.foo.local --group somegroup --template linux,dns
While this makes the host depend on okc-default-host
with identical config:
okconfig addhost somehost.foo.local --group somegroup
okconfig addtemplate somehost.foo.local --template linux,dns
quick workaround is to run:
pynag add host host_name=linux-server use=generic-host
I'm going to take a look at what is going on in the code.
ps: linux-server is distributed as part of nagios rpm on redhat. I am guessing @ramiro is running some other distribution.
That's right. I'm using Debian.
It seems at least one distribution modifies the configuration shipped with Nagios. And it seem like neither of these mods are general enough.
It's a good thing okconfig doesn't depend on any of these arbitrary templates. ISTM safest choice would be to assume there are no previous definitions and the Nagios/Icinga configuration is fully managed by okconfig starting from a clean room scenario.
Thanks for the fix and for okconfig.
Steps to reproduce:
It produces the above error message. The host definition OKConfig created inherits from a
'linux-server'
template o abstract host definition that isn't shipped either with OKConfig, pynag or adagios, nor with the Nagios default configuration.reading the OKConfig source code, this section shows other templates names
'windows-server'
and'generic-switch'
are used that don't exist either.