Skip to content

Commit ed9b744

Browse files
authored
Merge pull request #4739 from zenoss/backport/ZEN-35406.7x
ZEN-35406: RMMonitor - missing monitoring for some graphs of ZenHub component on fresh install RM 6.9.0
2 parents ed1c91f + 1825bf7 commit ed9b744

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/Products/ZenUI3/browser/modelapi/modelapi.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,19 @@ def __call__(self):
5050
collectors = []
5151
collectorDaemons = []
5252

53-
for hub in self.context.dmd.Monitors.Hub.objectValues(spec='HubConf'):
54-
hubService = appfacade.queryHubDaemons(hub.id)[0]
55-
zenHubs.append(dict(id='hub_{}'.format(hub.id),
56-
title=hub.id,
57-
controlplaneServiceId=hubService.id,
58-
lastModeledState=str(hubService.state).lower(),
59-
RAMCommitment=getattr(hubService, 'RAMCommitment', None),
60-
instanceCount=hubService.instances))
53+
for hub in self.context.dmd.Monitors.Hub.objectValues(spec="HubConf"):
54+
# Filter out the main ZenHub service
55+
hubService = filter(lambda svc: svc.name.lower() == "zenhub", appfacade.queryHubDaemons(hub.id))[0]
56+
zenHubs.append(
57+
dict(
58+
id="hub_{}".format(hub.id),
59+
title=hub.id,
60+
controlplaneServiceId=hubService.id,
61+
lastModeledState=str(hubService.state).lower(),
62+
RAMCommitment=getattr(hubService, "RAMCommitment", None),
63+
instanceCount=hubService.instances,
64+
)
65+
)
6166

6267
for collector in hub.collectors():
6368
collectors.append(dict(id='collector_{}'.format(collector.id),

0 commit comments

Comments
 (0)