2021-03-07 14:06:18 +01:00
|
|
|
# `check_xmppng` - check plugin for XMPP
|
2015-02-11 22:13:51 +01:00
|
|
|
|
|
|
|
This program implements a nagios check plugin for XMPP servers implementing the
|
2015-02-11 22:48:33 +01:00
|
|
|
XMPP protocol as specified in [RFC 6120](http://tools.ietf.org/html/rfc6120).
|
2015-02-11 22:13:51 +01:00
|
|
|
|
|
|
|
The program implements the following features:
|
|
|
|
|
|
|
|
* check client to server (C2S) as well as server to server (S2S) ports
|
|
|
|
* check XMPP servers on IPv6 and IPv4 addresses
|
|
|
|
* support STARTTLS as specified in RFC 6120 section 5.
|
|
|
|
* check the validity of the server certificate presented by the XMPP server
|
|
|
|
|
2021-03-07 14:06:18 +01:00
|
|
|
The plugin has been implemented because of insufficiencies in `check_ssl_cert`
|
|
|
|
and the existing
|
|
|
|
[`check_xmpp`](https://exchange.icinga.org/exchange/check_xmpp).
|
2015-02-11 22:13:51 +01:00
|
|
|
|
|
|
|
Maximum acceptable timeouts as well as minimum acceptable number of days the
|
|
|
|
server certificate needs to be valid can be specified as command line
|
|
|
|
parameters. For a full list of parameters see the *Usage* section below.
|
|
|
|
|
|
|
|
|
2015-02-11 22:48:33 +01:00
|
|
|
## Dependencies
|
2015-02-11 22:13:51 +01:00
|
|
|
|
|
|
|
The program is implemented in Python 3 and uses the following libraries besides
|
|
|
|
the Python standard library:
|
|
|
|
|
2015-02-11 22:48:33 +01:00
|
|
|
* [defusedxml](https://pypi.python.org/pypi/defusedxml/) to sanitize XML from
|
2015-02-11 22:13:51 +01:00
|
|
|
the XMPP server
|
2015-02-11 22:48:33 +01:00
|
|
|
* [nagiosplugin](https://pypi.python.org/pypi/nagiosplugin) to take care of the
|
|
|
|
nagios plugin interface boilerplate code
|
2015-02-11 22:13:51 +01:00
|
|
|
|
|
|
|
The software has been developed and tested with the following versions:
|
|
|
|
|
2021-03-07 14:06:18 +01:00
|
|
|
* Python 3.7.3
|
|
|
|
* defusedxml 0.5.0
|
|
|
|
* nagiosplugin 1.2.4
|
2015-02-11 22:13:51 +01:00
|
|
|
|
|
|
|
|
2015-02-11 22:48:33 +01:00
|
|
|
## License
|
2015-02-11 22:13:51 +01:00
|
|
|
|
2021-03-07 14:06:18 +01:00
|
|
|
`check_xmppng` is free software: you can redistribute it and/or modify it under
|
2015-02-11 22:13:51 +01:00
|
|
|
the terms of the GNU General Public License as published by the Free Software
|
|
|
|
Foundation, either version 3 of the License, or (at your option) any later
|
|
|
|
version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
|
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along with
|
2015-02-11 22:48:33 +01:00
|
|
|
this program in the file `COPYING`. If not, see
|
|
|
|
http://www.gnu.org/licenses/.
|
|
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```
|
2019-06-23 23:11:41 +02:00
|
|
|
usage: check_xmppng [-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]
|
2015-02-11 22:48:33 +01:00
|
|
|
|
|
|
|
Check XMPP services
|
|
|
|
|
|
|
|
optional arguments:
|
|
|
|
-h, --help show this help message and exit
|
|
|
|
-H HOST_ADDRESS, --host-address HOST_ADDRESS
|
|
|
|
host address
|
|
|
|
-p PORT, --port PORT port
|
|
|
|
--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
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Contact
|
2015-02-11 22:13:51 +01:00
|
|
|
|
2021-03-07 14:06:18 +01:00
|
|
|
If you want to provide feedback or bug reports please use the [bug
|
|
|
|
tracker](https://git.dittberner.info/jan/check_xmppng/issues) or send me an
|
|
|
|
email to jan (at) dittberner [dot] info.
|