File monitoring-plugins-mumble-add_perfdata.patch of Package monitoring-plugins-mumble

--- check_mumble.py	2015-01-13 17:44:45.850387927 +0100
+++ check_mumble.py.new	2015-01-13 18:16:04.856464130 +0100
@@ -12,6 +12,7 @@
 maxbans = -1
 warning = False
 reportstr = ""
+perfstr = ""
 warningstr = ""
 
 
@@ -50,7 +51,9 @@
 
 
 reportstr += "users: " + str(len(players)) + ", channels: " + str(len(channels)) + ", bans: " + str(len(bans))
-
+perfstr += "users=" + str(len(players)) + ";" + str(minusers) + ":" + str(maxusers) + ";;;"
+perfstr += "channels=" + str(len(channels)) + ";" + str(minchannels) + ":" + str(maxchannels) + ";;;"
+perfstr += "bans=" + str(len(bans)) + ";" + str(minbans) + ":" + str(maxbans) + ";;;"
 
 if(minusers > 0):
         if(minusers > len(players)):
@@ -79,9 +82,9 @@
 
 
 if(warning):
-        reportstr = "WARNING: " + reportstr + ", warnings:" + warningstr
+        reportstr = "WARNING: " + reportstr + ", warnings:" + warningstr + "|" + perfstr
 else:
-        reportstr = "OK: " + reportstr
+        reportstr = "OK: " + reportstr + "|" + perfstr
 print reportstr
 if(warning):
         sys.exit(1)
openSUSE Build Service is sponsored by