X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=dsa-nagios-checks%2Fchecks%2Fdsa-check-entropy;h=ddf1d92f395db019cfab709a16f7c6e96eac7483;hb=f4b31b6ed97313f5abdcd368f3be7f11970916ed;hp=e2c61e22d9aea6ace7eb4e34fa8321d57c7f3675;hpb=fe8c29f0782afe107bbb45fe2a74ddc25264bbcd;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-checks/checks/dsa-check-entropy b/dsa-nagios-checks/checks/dsa-check-entropy index e2c61e2..ddf1d92 100755 --- a/dsa-nagios-checks/checks/dsa-check-entropy +++ b/dsa-nagios-checks/checks/dsa-check-entropy @@ -1,6 +1,7 @@ #!/usr/bin/python # Copyright 2011 Peter Palfrader +# Copyright 2014 Hendrik Koehler # # 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: