Page 1 of 1

[Nagios-devel] Bug and Patch - Links in Hostgroup Summary

Posted: Wed Jun 25, 2008 9:52 am
by Guest
This is a multi-part message in MIME format.
--------------010302020302040900060600
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

In "Hostgroup Summary", some links to hosts' status are wrong. They link
to a complete "Service Status" when it should be a "Host Status" only.

So if there is 3 hosts (without services) DOWN in a hostgroup, I can't
get the "Host Status" for all hosts DOWN of the hostgroup since there is
no service defined.

Attached is a patch that fixes this problem.

--
Mathieu

--------------010302020302040900060600
Content-Type: text/plain;
name="hostgroups-status-summary-hostdetail.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="hostgroups-status-summary-hostdetail.patch"

--- nagios-3.0.2/cgi/status.c 2008-06-25 13:34:11.000000000 -0400
+++ nagios-3.0.2-original/cgi/status.c 2008-05-19 14:42:28.000000000 -0400
@@ -3861,7 +3861,7 @@

if(hosts_up>0){
printf("");
- printf("%d UP",STATUS_CGI,url_encode(temp_hostgroup->group_name),HOST_UP,host_properties,hosts_up);
+ printf("%d UP",STATUS_CGI,url_encode(temp_hostgroup->group_name),HOST_UP,host_properties,hosts_up);
printf("\n");
}

@@ -3870,7 +3870,7 @@
printf("\n");
printf("\n");

- printf("%d DOWN :\n",STATUS_CGI,url_encode(temp_hostgroup->group_name),HOST_DOWN,host_properties,hosts_down);
+ printf("%d DOWN :\n",STATUS_CGI,url_encode(temp_hostgroup->group_name),HOST_DOWN,host_properties,hosts_down);

printf("\n");

@@ -3898,7 +3898,7 @@
printf("\n");
printf("\n");

- printf("%d UNREACHABLE :\n",STATUS_CGI,url_encode(temp_hostgroup->group_name),HOST_UNREACHABLE,host_properties,hosts_unreachable);
+ printf("%d UNREACHABLE :\n",STATUS_CGI,url_encode(temp_hostgroup->group_name),HOST_UNREACHABLE,host_properties,hosts_unreachable);

printf("\n");

@@ -3922,7 +3922,7 @@
}

if(hosts_pending>0)
- printf("%d PENDING\n",STATUS_CGI,url_encode(temp_hostgroup->group_name),HOST_PENDING,host_properties,hosts_pending);
+ printf("%d PENDING\n",STATUS_CGI,url_encode(temp_hostgroup->group_name),HOST_PENDING,host_properties,hosts_pending);

printf("\n");


--------------010302020302040900060600--





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