mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2026-02-06 07:05:17 +01:00
check_rhcs now supports vm's as services
This commit is contained in:
@@ -95,9 +95,8 @@ def getServiceState(dom, service):
|
|||||||
groupList = dom.getElementsByTagName('group')
|
groupList = dom.getElementsByTagName('group')
|
||||||
hostname = socket.gethostname()
|
hostname = socket.gethostname()
|
||||||
serviceState = {}
|
serviceState = {}
|
||||||
|
|
||||||
for group in groupList:
|
for group in groupList:
|
||||||
if group.attributes['name'].value == "service:"+service:
|
if group.attributes['name'].value in (service,"service:"+service,"vm:"+service):
|
||||||
serviceState['owner'] = group.attributes['owner'].value
|
serviceState['owner'] = group.attributes['owner'].value
|
||||||
serviceState['state'] = group.attributes['state_str'].value
|
serviceState['state'] = group.attributes['state_str'].value
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user