Re: [Nagios-devel] nagios -v not counting all warnings

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] nagios -v not counting all warnings

Post by Guest »

2009/12/19 Jim Avery :
> 2009/12/17 Ton Voon :
>
>> Can you get a minimal config that displays this behaviour? I'll add it
>> to the tests in CVS.
>
> Yes I will do in the next few days. =A0I'm sorry I didn't have any spare
> time yesterday.
>
>> Should it be counted in the warnings or is it just an informational
>> message?
>
> If it were just informational, I suppose you could simply change the
> "Warning" to "Information" and have done with it. =A0Personally I'd
> rather it remain a warning (and gets counted) as it does point to a
> genuine mistake in the config.

Okay here's the minimal config (I'm assuming you already have simple
templates for generic-host and generic-service):

define command{
command_name check_dummy
command_line $USER1$/check_dummy $ARG1$
}
define hostgroup{
hostgroup_name test
alias test - hosts used for testing
}
define host{
use generic-host
host_name test
alias test - Host used for testing new service checks in Nagios
address 10.123.123.123
hostgroups +test
parents localhost
}
define service
host_name test
use generic-service
service_description test
check_command check_dummy!0 "test always succeeds"
}
define service
host_name test
use generic-service
service_description test
check_command check_dummy!0 "test always succeeds"
}



When I run nagios -v against a nagios.cfg which reads this config, I get:

Warning: Duplicate definition found for service 'test' on host
'test' (config file '/usr/local/nagios/etc/objects/test/services.cfg',
starting on line 1)

which is fair enough as the service is indeed defined twice, but in
the totals at the end I get:

Total Warnings: 0
Total Errors: 0

Note this behaves the same whether the second service is defined using
directive "host_name test" or "hostgroup_name test".


hth,

Jim





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked