Service definition 'time-saving tips' possible bug

Jon Lyons jlyons30 at yahoo.com
Tue Oct 29 22:17:14 CET 2002


Yep, however the hosts after the invaild hostname will provide a warning error stating that they have no services defined, so you can tell where the error is...
 Tom Lichti <tom at redpepperracing.com> wrote:Well, after seeing how I could 'save time' with the tips, I spent a day 
re-organizing my services file into templates and multi-host services. And 
it didn't work. So much for saving time. Any service that has multiple 
hosts in the host_name line seem to be completely ignored, and do not 
generate errors with the nagios -v test.

The problem was that I had a host in the list of 'host_name' that didn't 
exist in the hosts definition. It didn't give a warning to that effect 
though, it just stopped processing the hosts after that. For example, I had

define service{
use generic-websrvr-service
host_name 
websrvr-100,websrvr-101,websrvr-102,websrvr-103,websrvr-104,websrvr-105,we
bsrvr-106,websrvr-107,websrvr-108,websrvr-109,websrvr-110,websrvr-112,websr
vr-113,websrvr-114,websrvr-115,websrvr-116,websrvr-117,websrvr-118,websrvr-
119
service_description Disk Space
check_command check_all_disks_r!!85!95
}

But websrvr-107 did not exist in the hosts file, so it appears that it 
stops processing the list of hosts if it finds one that does not exist in 
the hosts definitions. Ok, fine, except that there was no warning! Argh.

Anyway, I've fixed my services file, but that was a bit of pain to find.

Tom


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users

-----

Jon Lyons
Black Honda F3 #800


---------------------------------
Do you Yahoo!?
HotJobs - Search new jobs daily now
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20021029/de085fdd/attachment.html>


More information about the Users mailing list