From c0b55dfde41a11f11b673b96b2c6fddadadd2641 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Thu, 21 May 2015 10:24:42 +0200 Subject: Add --quiet-ok. --- tools/check-sth.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools') 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__': -- cgit v1.1