diff options
Diffstat (limited to 'tools/check-sth.py')
-rwxr-xr-x | tools/check-sth.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/check-sth.py b/tools/check-sth.py index 823ca2c..0cdc031 100755 --- a/tools/check-sth.py +++ b/tools/check-sth.py @@ -30,6 +30,7 @@ parser.add_argument('publickey', help='File containing the public key for the CT parser.add_argument('baseurl', help="Base URL for CT log") parser.add_argument('--cafile', default=None, metavar='file', help='File containing the CA cert') parser.add_argument('--allow-lag', action='store_true', help='Allow node to lag behind previous STH') +parser.add_argument('--quiet-ok', action='store_true', help="Don't print status if OK") def print_sth(sth): if sth is None: @@ -129,7 +130,8 @@ def main(args): write_file(args.cur_sth, newsth) - print "OK: size: %d hash: %s, %s" % (newsth["tree_size"], b64_to_b16(newsth["sha256_root_hash"])[:8], age) + if not args.quiet_ok: + print "OK: size: %d hash: %s, %s" % (newsth["tree_size"], b64_to_b16(newsth["sha256_root_hash"])[:8], age) sys.exit(NAGIOS_OK) if __name__ == '__main__': |