(0000487)
ziesemer (reporter)
2012-06-14 09:57
|
Please review the attached serviceCountTest.cfg, which can be used to reproduce. This is a Nagios 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 Nagios instance.
An unpatched Nagios instance current displays this as the following (incorrectly), showing both the host status summary count + service status summary count:
serviceCountTest-prod (serviceCountTest-prod) 1 PENDING 16 PENDING
serviceCountTest-prod1 (serviceCountTest-prod1) 1 PENDING 8 PENDING
serviceCountTest-prod1-app (serviceCountTest-prod1-app) 1 PENDING 2 PENDING
serviceCountTest-prod1-db (serviceCountTest-prod1-db) 1 PENDING 2 PENDING
serviceCountTest-prod2 (serviceCountTest-prod2) 1 PENDING 8 PENDING
serviceCountTest-prod2-app (serviceCountTest-prod2-app) 1 PENDING 2 PENDING
serviceCountTest-prod2-db (serviceCountTest-prod2-db) 1 PENDING 2 PENDING
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, both serviceCountTest-prod1 and serviceCountTest-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 from show_servicegroup_service_totals_summary.
Please advise if there is any other details I can provide to assist in resolving this issue.
Thanks! |