[dev.icinga.com #2019] Wrong output from status.cgi with option hostservicedetail #766

Closed
icinga-migration opened this Issue Oct 18, 2011 · 4 comments

Projects

None yet

1 participant

@icinga-migration
Member

This issue has been migrated from Redmine: https://dev.icinga.com/issues/2019

Created by stku on 2011-10-18 13:27:48 +00:00

Assignee: ricardo
Status: Resolved (closed on 2011-11-15 09:24:33 +00:00)
Target Version: 1.6
Last Update: 2014-12-08 09:42:23 +00:00 (in Redmine)

Icinga Version: 1.10.0
OS Version: any

Hello, status.cgi with the option hostservicedetail into the section "Host Status Detail" also Service Problems will be displayed. If a host is down and all Services for this Host are Critical or Unknown which is normal. Then I get the Host in the section "Host Status Detail" displayed multiple times with state DOWN which is correct but also with Critical and Unknown which comes from the Services. With a small change in status.c the output will be correct.

My change on status.c

--- a/cgi/status.c
+++ b/cgi/status.c
@@ -655,6 +655,7 @@ int main(void) {
                        show_host_detail();
                else if (group_style_type == STYLE_HOST_SERVICE_DETAIL) {

+            group_style_type = STYLE_HOST_DETAIL;
                        show_host_detail();

                        /* only show service problems of Hosts which are
@@ -670,7 +671,10 @@ int main(void) {
                                printf("\n");
                        }

+            group_style_type = STYLE_SERVICE_DETAIL;
                        show_service_detail();
+            group_style_type = STYLE_HOST_SERVICE_DETAIL;
+
                } else
                        show_service_detail();
        } else if (display_type == DISPLAY_SERVICEGROUPS) {
@@ -5152,7 +5156,7 @@ void grab_statusdata(void) {
        temp_hostgroup = find_hostgroup(hostgroup_name);
        temp_servicegroup = find_servicegroup(servicegroup_name);

-       if (group_style_type == STYLE_HOST_DETAIL || group_style_type == STYLE_HOST_SERVICE_DETAIL) {
+       if (group_style_type == STYLE_HOST_DETAIL) {

                for (temp_hoststatus = hoststatus_list; temp_hoststatus != NULL; temp_hoststatus = temp_hoststatus->next) {

@@ -5193,7 +5197,7 @@ void grab_statusdata(void) {

                }
        }
-       if (group_style_type != STYLE_HOST_DETAIL || group_style_type == STYLE_HOST_SERVICE_DETAIL) {
+       if (group_style_type != STYLE_HOST_DETAIL) {
                if (service_filter != NULL)
                        regcomp(&preg, service_filter, 0);
                if (host_filter != NULL)

Changesets

2011-10-26 20:10:56 +00:00 by ricardo 1fc4e4b

classic-ui: fixed wrong output from status.cgi with option hostservicedetail #2019

refs: #2019

Thanks to stku
@icinga-migration
Member

Updated by ricardo on 2011-10-26 19:57:24 +00:00

  • Assigned to set to ricardo
  • Target Version set to 1.6

will have a look

@icinga-migration
Member

Updated by ricardo on 2011-11-05 16:26:36 +00:00

  • Status changed from New to Feedback
  • Done % changed from 0 to 100

this is already fixed in current dev/cgis

@icinga-migration
Member

Updated by mfriedrich on 2011-11-15 09:24:33 +00:00

  • Status changed from Feedback to Resolved
@icinga-migration
Member

Updated by mfriedrich on 2014-12-08 09:42:23 +00:00

  • Project changed from 19 to Core, Classic UI, IDOUtils
  • Category set to Classic UI
  • Icinga Version set to 1
  • OS Version set to any
@icinga-migration icinga-migration added this to the 1.6 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment