From 54c0833ffebbcd1df40f2d13d623b2e1525990d5 Mon Sep 17 00:00:00 2001 From: Shubhendu Tripathi Date: Tue, 25 Mar 2014 18:07:41 +0530 Subject: 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 Reviewed-on: https://code.engineering.redhat.com/gerrit/21798 Reviewed-by: Sahina Bose --- plugins/check_remote_host.py | 2 +- plugins/livestatus.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') 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) -- cgit