Add performance information for Icinga2
authorHendrik Köhler <hendrik.koehler@credativ.de>
Thu, 17 Jul 2014 12:13:12 +0000 (14:13 +0200)
committerPeter Palfrader <peter@palfrader.org>
Fri, 18 Jul 2014 08:51:34 +0000 (10:51 +0200)
Extend dsa-check-entropy output so Icinga2 can process performance
data (e.g. used by Graphite).
Signed-off-by: Hendrik Köhler <hendrik.koehler@credativ.de>
Signed-off-by: Peter Palfrader <peter@palfrader.org>
dsa-nagios-checks/checks/dsa-check-entropy
dsa-nagios-checks/debian/changelog

index e2c61e2..2c81d2c 100755 (executable)
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 # Copyright 2011 Peter Palfrader
+# Copyright 2014 Hendrik Köhler
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -64,16 +65,16 @@ while tries <= options.retries:
 
     if avail >= options.watermark:
         if tries > 0:
-            print "OK: %d bytes in the pool after %d attempts."%(avail, tries)
+            print "OK: %d bytes in the pool after %d attempts.|entropy=%d bytes"%(avail, tries, avail)
         else:
-            print "OK: %d bytes in the pool."%(avail)
+            print "OK: %d bytes in the pool.|entropy=%d bytes"%(avail, avail)
         sys.exit(0)
 
     values.append(avail)
     time.sleep(1.0 * options.sleep / 1000)
     tries += 1
 
-print "WARNING: Too little entropy in the pool (min: %d, max: %d in %d reads)"%(min(values), max(values), tries-1)
+print "WARNING: Too little entropy in the pool (min: %d, max: %d in %d reads)|entropy=%d bytes"%(min(values), max(values), tries-1, avail)
 sys.exit(1)
 
 # vim:set et:
index 320205a..ab6f1b4 100644 (file)
@@ -1,5 +1,6 @@
 dsa-nagios-checks (101) UNRELEASED; urgency=low
 
+  [ Peter Palfrader ]
   * dsa-check-zone-rrsig-expiration-many: add --debug option to pass through.
   * dsa-check-zone-rrsig-expiration: Do not ask for RRSIG directly, instead
     ask for SOA with dnssec data.  Apparently some nameservers do give you the
@@ -7,6 +8,10 @@ dsa-nagios-checks (101) UNRELEASED; urgency=low
   * dsa-check-hpasm: Support supplying a list of things for which failures are
     ignored.
 
+  [ Hendrik Köhler ]
+  * Extend dsa-check-entropy output so Icinga2 can process performance
+    data (e.g. used by Graphite).
+
  -- Peter Palfrader <weasel@debian.org>  Tue, 01 Jul 2014 18:34:23 +0200
 
 dsa-nagios-checks (100) unstable; urgency=low