]> git.michaelhowe.org Git - packages/n/nagios-plugins-local.git/commitdiff
Remove value=payload from perf data
authorMichael Howe <michael@michaelhowe.org>
Sat, 9 Jan 2021 14:59:47 +0000 (14:59 +0000)
committerMichael Howe <michael@michaelhowe.org>
Sat, 9 Jan 2021 14:59:47 +0000 (14:59 +0000)
Per icinga2 docs, perfdata should be 'metric'=number - arbitrary strings
aren't supported.

debian/changelog
plugins/check_mqtt

index 3e20463b07973b057ed123c653e3c15fdc0e3ab6..39ce03d62f63e83fa0d3602b03bbf1000f74430f 100644 (file)
@@ -1,9 +1,9 @@
-nagios-plugins-local (0.22~test.0) UNRELEASED; urgency=medium
+nagios-plugins-local (0.22~test.1) UNRELEASED; urgency=medium
 
   * New version of check_mqtt, from https://github.com/jpmens/check-mqtt/
     This adds python3 support and works with buster. 
 
- -- Michael Howe <michael@michaelhowe.org>  Sat, 04 Jan 2020 21:23:08 +0000
+ -- Michael Howe <michael@michaelhowe.org>  Sat, 09 Jan 2021 14:35:02 +0000
 
 nagios-plugins-local (0.21) unstable; urgency=medium
 
index f70d19a5a8bb0defc12ad4657e4657a107900f63..6e77079a4e7f216d10c73464d7032664f475636b 100755 (executable)
@@ -143,9 +143,9 @@ def on_message(mosq, userdata, msg):
     userdata['have_response'] = True
 
     if args.short_output == True:
-        message = "value=%s | response_time=%.2f value=%s" % (str(payload), elapsed, str(payload))
+        message = "value=%s | 'response_time'=%.2f" % (str(payload), elapsed)
     else:
-        message = "message from %s at %s in %.2fs | response_time=%.2f value=%s" % (args.check_subscription, args.mqtt_host, elapsed, elapsed, str(payload))
+        message = "%s message from %s at %s in %.2fs | 'response_time'=%.2f" % (str(payload), args.check_subscription, args.mqtt_host, elapsed, elapsed)
 
     if module_math and (args.critical is not None or args.warning is not None):
         status == Status.OK