Page 1 of 1

Re: [Nagios-devel] typo in xodtemplate.c

Posted: Thu Jun 26, 2008 6:17 am
by Guest
Hi,

I'm seeing this typo when I try to dynamically define services on =20
hosts using hostgroups. That is, a set of services are "mapped" to an =20=

empty hostgroup, and then hosts are defined as members inside of the =20
"define host" directive. This works very well for defining a set of =20
default services as documented at, "All Hosts In Multiple Hostgroups" =20=

- http://nagios.sourceforge.net/docs/3_0/ ... ricks.html.

Using this technique - when I run a pre-flight check on my configs it =20=

warns me of duplicates. I think this is a bug since the "defining =20
moment" of one of these services happens twice in the eyes of the =20
sanity checker "skiplist_insert": 1) when you map the service to a =20
hostgroup (meta host object?) and then again, 2) when you subscribe =20
the host to the hostgroup and the service is actually created.

I don't see how these are reported as duplicates when the code right =20
before the logit() message is:

/* skip service definitions without enough data */
if(temp_service->host_name=3D=3DNULL || temp_service-=20=

>service_description=3D=3DNULL)
continue;

Please see this thread: =
http://www.meulie.net/portal_plugins/fo ... 11467.last

Any ideas?

---

Caylan


> hello
>
> There is a smale typo in xodtemplate.c around line 5215 (nagios =20
> 3.0.2):
>
> logit(NSLOG_CONFIG_WARNING,TRUE,"Warning: Duplicate definition found =20=

> for service '%s' on host '%s'
> (config file '%s', starting on line %d)\n",temp_service-=20
> >host_name,temp_service-=20
> >service_description,xodtemplate_config_file_name(temp_service-=20
> >_config_file),temp_service->_start_line);
>
> host_name and service_description have been swaped.
>
> --=20
> St=E9phane Urbanovski





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