From 81eb543c8f541c62df7c70a129254f3b1cccdea4 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Wed, 11 Feb 2015 00:05:37 +0100 Subject: [PATCH] update documentation, add help for --no-check-certificate --- README | 27 +++++++++++++++++++++++---- check_xmpp | 3 ++- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/README b/README index 33334b9..d17e30c 100644 --- a/README +++ b/README @@ -5,8 +5,10 @@ nagios/icinga check for XMPP Usage: ------ -usage: check_xmpp [-h] -H HOST_ADDRESS [-p PORT] [-s | -c] [-4 | -6] - [--servername SERVERNAME] [--starttls] +usage: check_xmpp [-h] -H HOST_ADDRESS [-p PORT] [--s2s | --c2s] [-4 | -6] + [--servername SERVERNAME] [--starttls] [-w SECONDS] + [-c SECONDS] [--no-check-certificates] [-r CAROOTS] + [--warn-days WARNDAYS] [--crit-days CRITDAYS] [-v] Check XMPP services @@ -15,10 +17,27 @@ optional arguments: -H HOST_ADDRESS, --host-address HOST_ADDRESS host address -p PORT, --port PORT port - -s, --s2s server to server (s2s) - -c, --c2s client to server (c2s) + --s2s server to server (s2s) + --c2s client to server (c2s) -4, --ipv4 enforce IPv4 -6, --ipv6 enforce IPv6 --servername SERVERNAME server name to be used --starttls check whether the service allows starttls + -w SECONDS, --warning SECONDS + return warning if connection setup takes longer than + SECONDS + -c SECONDS, --critical SECONDS + return critical if connection setup takes longer than + SECONDS + --no-check-certificates + do not check whether the XMPP server's certificate is + valid + -r CAROOTS, --ca-roots CAROOTS + path to a file or directory where CA certifcates can + be found + --warn-days WARNDAYS set state to WARN if the certificate is valid for not + more than the given number of days + --crit-days CRITDAYS set state to CRITICAL if the certificate is valid for + not more than the given number of days + -v, --verbose diff --git a/check_xmpp b/check_xmpp index 1c24b48..e998040 100755 --- a/check_xmpp +++ b/check_xmpp @@ -400,7 +400,8 @@ def main(): "-c", "--critical", metavar="SECONDS", default='', help="return critical if connection setup takes longer than SECONDS") parser.add_argument( - "--no-check-certificates", dest='checkcerts', action='store_false') + "--no-check-certificates", dest='checkcerts', action='store_false', + help="do not check whether the XMPP server's certificate is valid") parser.add_argument( "-r", "--ca-roots", dest="caroots", help="path to a file or directory where CA certifcates can be found")