diff options
author | Sahina Bose <sabose@redhat.com> | 2014-03-21 14:16:30 +0530 |
---|---|---|
committer | Bala.FA <barumuga@redhat.com> | 2014-04-29 10:21:37 +0530 |
commit | 6fb70dc1fd61805ef75ae14b92f0f7c236519688 (patch) | |
tree | 5c81c2940d4d09902eea950a3ec567933ba36a57 /plugins | |
parent | 355e925c9272a86ddca4a2e3d566880e0a537b29 (diff) |
plugins: Fixing template, commands and vol utilization
Fixed the template, commands and vol utilization
plugin
Change-Id: I11eb562f6f563d066938110f730512ae0b772eaf
Signed-off-by: Sahina Bose <sabose@redhat.com>
Reviewed-on: https://cuckoo.blr.redhat.com:8443/66
Reviewed-by: Nishanth Thomas <nishusemail@gmail.com>
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/check_vol_utilization_server.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/check_vol_utilization_server.py b/plugins/check_vol_utilization_server.py index 8b08f21..d34e212 100755 --- a/plugins/check_vol_utilization_server.py +++ b/plugins/check_vol_utilization_server.py @@ -13,19 +13,19 @@ def excecNRPECommand(host): answer = livestatus.checkLiveStatus("GET hosts\nColumns: address\n" "Filter: display_name = " + host + "\n") - command = _NRPEPath + " -H " + answer.rstrip() + " -c " \ - "check_vol_utilization -a " + args.volume + " " + \ - str(args.warning) + " " + str(args.critical) + command = (_NRPEPath + " -H " + answer.rstrip() + " -c " + + "check_vol_utilization -a " + args.volume + " " + + str(args.warning) + " " + str(args.critical)) status = commands.getoutput(command) return status def showVolumeUtilization(args): - table = livestatus.readLiveStatus("GET hostgroups\nColumns: members name\n" + table = livestatus.readLiveStatus("GET hostgroups\nColumns: members\n" "Filter: name = " + args.hostgroup + "\n") tab1 = table[0] - list_hosts = tab1[0].split(";") + list_hosts = tab1[0].split(",") #First take a random host from the group and send the request host = random.choice(list_hosts) status = excecNRPECommand(host) |