Duplicate Service Check Entries
Posted: Fri Jan 27, 2012 5:29 pm
3 days ago, something happened for which I have no explanation. One of our customers has 27 systems, and 5 of the same service checks became replicated across all the hosts. Running the following query returns the below truncated results:
--------------------------------------------------
SELECT DISTINCT NH.display_name, NS.*
FROM nagios.nagios_hosts AS NH
JOIN nagios.nagios_services AS NS ON NS.host_object_id = NH.host_object_id
WHERE NS.display_name LIKE '%164%'
ORDER BY NS.display_name
--------------------------------------------------
The check is valid for, and appears in the the proper service config file for host_object_id 778. Although it shows in Nagios and Nagios XI, the check definition is not in any of the other service config files.....just the database. I have tried deleting from nagios.nagios_objects, nagios.nagios_services, nagios_nagios_servicechecks, but when I "Apply Configuration" after the delete queries, they reappear in the database. If I delete it from nagios.nagios_objects, when it returns, it has a different object_id. What can I do to make them go away except for the host for which it belongs?
Thanks,
Andy
Sorry for the formatting. You can save as text and open in Excel as Comma-Deliminated
ew1106 - Customer1 Production Delivery Server CD1,3774457,1,1,780,14245, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew530.ehosting.net,3775616,1,1,990,14324, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1109 - Customer1 Backup/Secondary DB Server SQL2,3774484,1,1,783,14259, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1113 - Customer1 Linux Primary Web/DB,3774509,1,1,787,14274, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
PVM113.ehosting.net,3773944,1,1,7998,14214, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1116 - Customer1 Linux Dev VM,3774537,1,1,790,14289, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1102 - Customer1 Vhost1 VMWare Server,3774426,1,1,776,14229, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1304.ehosting.net,3775057,1,1,13671,14304, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1105 - Customer1 AD ProductionCMS CD Server,3774449,1,1,779,14241, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew529.ehosting.net,3775607,1,1,989,14319, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1108 - Customer1 Primary DB Server SQL1,3774474,1,1,782,14254, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
pvm125.ehosting.net,3777012,1,1,12105,14334, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1111 - Customer1 vCenter Active Directory,3774502,1,1,785,14269, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
Customer1-Sitecore-Cluster - 111.123.143.26 - HTTP Host Content Che,3773886,1,1,493,14343, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1115 - Customer1 Linux Authoring Node,3774529,1,1,789,14284, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
asa-Customer1.ehosting.net,3774004,1,1,564,14458, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1303.ehosting.net,3775049,1,1,13670,14299, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1104 - Customer1 Dev Server,3774441,1,1,778,5136, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew527.ehosting.net,3775596,1,1,988,14314, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1107 - Customer1 Production Delivery Server CD2,3774466,1,1,781,14249, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew531.ehosting.net,3775625,1,1,991,14329, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1110 - Customer1 VHost2 VMWare Server,3774497,1,1,784,14264, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1114 - Customer1 Linux Secondary Web/DB,3774520,1,1,788,14279, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
PVM114.ehosting.net,3773951,1,1,8464,14219, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1275.ehosting.net,3774986,1,1,12816,14294, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1103 - Customer1 VM Author Stage CM,3774432,1,1,777,14233, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1305.ehosting.net,3775065,1,1,13672,14309, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
--------------------------------------------------
SELECT DISTINCT NH.display_name, NS.*
FROM nagios.nagios_hosts AS NH
JOIN nagios.nagios_services AS NS ON NS.host_object_id = NH.host_object_id
WHERE NS.display_name LIKE '%164%'
ORDER BY NS.display_name
--------------------------------------------------
The check is valid for, and appears in the the proper service config file for host_object_id 778. Although it shows in Nagios and Nagios XI, the check definition is not in any of the other service config files.....just the database. I have tried deleting from nagios.nagios_objects, nagios.nagios_services, nagios_nagios_servicechecks, but when I "Apply Configuration" after the delete queries, they reappear in the database. If I delete it from nagios.nagios_objects, when it returns, it has a different object_id. What can I do to make them go away except for the host for which it belongs?
Thanks,
Andy
Sorry for the formatting. You can save as text and open in Excel as Comma-Deliminated
ew1106 - Customer1 Production Delivery Server CD1,3774457,1,1,780,14245, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew530.ehosting.net,3775616,1,1,990,14324, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1109 - Customer1 Backup/Secondary DB Server SQL2,3774484,1,1,783,14259, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1113 - Customer1 Linux Primary Web/DB,3774509,1,1,787,14274, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
PVM113.ehosting.net,3773944,1,1,7998,14214, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1116 - Customer1 Linux Dev VM,3774537,1,1,790,14289, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1102 - Customer1 Vhost1 VMWare Server,3774426,1,1,776,14229, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1304.ehosting.net,3775057,1,1,13671,14304, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1105 - Customer1 AD ProductionCMS CD Server,3774449,1,1,779,14241, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew529.ehosting.net,3775607,1,1,989,14319, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1108 - Customer1 Primary DB Server SQL1,3774474,1,1,782,14254, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
pvm125.ehosting.net,3777012,1,1,12105,14334, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1111 - Customer1 vCenter Active Directory,3774502,1,1,785,14269, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
Customer1-Sitecore-Cluster - 111.123.143.26 - HTTP Host Content Che,3773886,1,1,493,14343, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1115 - Customer1 Linux Authoring Node,3774529,1,1,789,14284, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
asa-Customer1.ehosting.net,3774004,1,1,564,14458, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1303.ehosting.net,3775049,1,1,13670,14299, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1104 - Customer1 Dev Server,3774441,1,1,778,5136, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew527.ehosting.net,3775596,1,1,988,14314, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1107 - Customer1 Production Delivery Server CD2,3774466,1,1,781,14249, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew531.ehosting.net,3775625,1,1,991,14329, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1110 - Customer1 VHost2 VMWare Server,3774497,1,1,784,14264, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1114 - Customer1 Linux Secondary Web/DB,3774520,1,1,788,14279, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
PVM114.ehosting.net,3773951,1,1,8464,14219, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1275.ehosting.net,3774986,1,1,12816,14294, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1103 - Customer1 VM Author Stage CM,3774432,1,1,777,14233, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996
ew1305.ehosting.net,3775065,1,1,13672,14309, HTTP - 111.123.159.164/ping.aspx - Content - the site is up,2996