summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorShubhendu Tripathi <shtripat@redhat.com>2014-03-25 18:07:41 +0530
committerBala.FA <barumuga@redhat.com>2014-04-29 10:21:37 +0530
commit54c0833ffebbcd1df40f2d13d623b2e1525990d5 (patch)
tree1fac2b4703b966889335a788989f9c8e08973f53 /plugins
parent6fb70dc1fd61805ef75ae14b92f0f7c236519688 (diff)
rhsc-nagios-addon: Fixed an issue with livestatus
The readLiveStatus() method was not returning the status details. Fixed the same. Change-Id: I604a99c39c92f94b1ebab1e153f06223b5f6f39c Signed-off-by: Shubhendu Tripathi <shtripat@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/21798 Reviewed-by: Sahina Bose <sabose@redhat.com>
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/check_remote_host.py2
-rw-r--r--plugins/livestatus.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_remote_host.py b/plugins/check_remote_host.py
index 31ff9dd..6f540df 100755
--- a/plugins/check_remote_host.py
+++ b/plugins/check_remote_host.py
@@ -106,7 +106,7 @@ if __name__ == "__main__":
srvc_status = checkLiveStatus(hostAddr, srvc)
finalStatus = finalStatus | srvc_status
if srvc_status == STATUS_CRITICAL:
- criticalSrvcs.append(srvc)
+ criticalSrvcs.append(str(srvc))
# Return the status
if finalStatus == STATUS_CRITICAL:
diff --git a/plugins/livestatus.py b/plugins/livestatus.py
index f0b3bb8..9fc2ad7 100644
--- a/plugins/livestatus.py
+++ b/plugins/livestatus.py
@@ -30,7 +30,7 @@ def readLiveStatus(cmd):
# Change the default separators to
# Linefeed for row, | for columns,
# comma for lists such as contacts, semicolon for lists such as hosts
- cmd += "\nSeparators: 10 124 44 59"
+ cmd += "\nSeparators: 10 124 44 59\n"
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect(_socketPath)