I've been setting up nagios for a little while here, and after finishing a fairly long list of hosts, hostgroups, services, and such; I've come to some strange bugs in some inheritances.
I'm using hostgroups for more easy control (we have a number of different servers running a plethora of services), so the inheritance looks like this:
Service -> hostgroup(s) -> hosttemplate(s) -> hosts
So interestingly, I've been getting a few errors that don't make sense. a number of them have been solved by fiddling with names and such, but most of the errors and such are nonsensical, given the situation:
Error:
Code: Select all
Error: Unable to locate host 'linux-mail' for service 'IMAP on port 143'
Error: Could not register service (config file '/opt/nagios/etc/objects/services.cfg', starting on line 61)
Code: Select all
define service{
name IMAP
use generic-service
hostgroup_name mail-servers
service_description IMAP on port 143
check_command check_imap
}
Code: Select all
define hostgroup{
hostgroup_name mail-servers
alias Incoming Mail Servers
members linux-mail
}
Code: Select all
define host{
host_name linux-mail
name linux-mail
use linux-server
register 0
}
Code: Select all
define host{
host_name $Hostname_here
address $Address_here
use linux-mail
register 1
}