Host/Hostgroups members
nagios at lumenexus.net
nagios at lumenexus.net
Thu Mar 25 21:32:24 CET 2004
After playing with the new hostgroup option in the host definations object
I noticed that when you do not define and hosts in the hostgroup object
that nagios adds the name of the hostgroup as a member. Attached is a very
small patch to correct this.
Thanks,
-Dale
-------------- next part --------------
--- xdata/xodtemplate.c.orig Thu Mar 25 18:04:05 2004
+++ xdata/xodtemplate.c Thu Mar 25 18:05:07 2004
@@ -6408,7 +6408,7 @@
/* add this list to the hostgroup members directive */
if(temp_hostgroup->members==NULL)
- temp_hostgroup->members=strdup(temp_ptr);
+ temp_hostgroup->members=strdup(temp_host->host_name);
else{
new_members=(char *)realloc(temp_hostgroup->members,strlen(temp_hostgroup->members)+strlen(temp_host->host_name)+2);
if(new_members!=NULL){
More information about the Developers
mailing list