This repository has been archived by the owner on Jan 15, 2019. It is now read-only.
[dev.icinga.com #2689] Servicegroup Summary page displays wrong totals under "Service Status Summary" #1007
Labels
Milestone
This issue has been migrated from Redmine: https://dev.icinga.com/issues/2689
Created by ziesemer on 2012-06-14 20:16:17 +00:00
Assignee: ricardo
Status: Resolved (closed on 2012-06-18 11:52:09 +00:00)
Target Version: 1.7.1
Last Update: 2014-12-08 09:42:46 +00:00 (in Redmine)
When viewing the "Servicegroup Summary" page (titled "Status Summary For All Service Groups") - the counts listed under "Host Status Summary" are correct, but not for "Service Status Summary". I.E., a box may show "20 OK", but clicking on it will only list 10 services (including "Results 1 - 10 of 10 Matching Services" displayed at the bottom).
This appears to be a bug in
status.cgi
, in theshow_servicegroup_service_totals_summary
function. This function is almost a clone ofshow_servicegroup_host_totals_summary
- just dealing with services instead of hosts. (Seems like a good opportunity for some re-factoring here...) The host function includes a check for "skip this if it isn't a new host" - but this check doesn't exist in the service function. Patching the service function with the same check appears to fix the issue, without causing any additional issues. I've not examined the code thoroughly enough yet to properly explain why this works - but I'm assuming it relies on the list of members always coming back in a sorted order.The patch I am using is attached - which is modified to apply cleanly to the icinga-1.7.0 release.
Also please review the attached
serviceCountTest.cfg
, which can be used to reproduce. This is an Icinga configuration file that is as minimal as I can make it. As long as you have a "linux-server" host template, "remote-service" service template, and a "check-host-alive" check command (defined in the default, "template" configuratoin files) - even if they don't do anything, you should easily be able to include this file into a test instance using cfg_file.This file contains a total of 8 services. This mimics 2 production environments, each with an application and database tier, each with 2 nodes each. There is one top-level service group to easily allow the entire environment to have its notifications disabled, downtime scheduled, etc. - assuming there are multiple other similar configurations on the same Icinga instance.
An unpatched Icinga instance current displays this as the following (incorrectly), showing both the host status summary count + service status summary count:
Note that there are 3 incorrect service counts here. There are only a total of 8 services defined, so
serviceCountTest-prod
should be 8, not 16. Also, bothserviceCountTest-prod1
andserviceCountTest-prod2
should be 4, not 8. The supplied patch fixes each of these.Note also that if I repeated the same configuration to exercise the host groups instead of the service groups, the host counts would be correct. This is because
show_servicegroup_host_totals_summary
already contains the logic contained within the patch, which is missing fromshow_servicegroup_service_totals_summary
.Please advise if there is any other details I can provide to assist in resolving this issue.
(This problem also exists in Nagios, and has an issue report (by me) at http://tracker.nagios.org/view.php?id=343.)
Attachments
Changesets
2012-06-15 04:29:12 +00:00 by ricardo 14d8a63
The text was updated successfully, but these errors were encountered: