go-xmpp/cmd/xmpp-check/README.md

50 lines
1.1 KiB
Markdown
Raw Normal View History

2019-05-16 16:09:39 +00:00
# XMPP Check
XMPP check is a tool to check TLS certificate on a remote server.
## Installation
2019-06-18 15:18:17 +00:00
To install `xmpp-check` in your Go path:
2019-05-16 16:09:39 +00:00
```
2019-06-19 09:43:16 +00:00
$ go get -u gosrc.io/xmpp/cmd/xmpp-check
2019-05-16 16:09:39 +00:00
```
## Usage
2019-07-16 20:03:26 +00:00
```
$ xmpp-check --help
Usage:
xmpp-check <host[:port]> [flags]
Examples:
xmpp-check chat.sum7.eu:5222 --domain meckerspace.de
Flags:
-d, --domain string domain if host handle multiple domains
-h, --help help for xmpp-check
```
2019-05-16 16:09:39 +00:00
If you server is on standard port and XMPP domains matches the hostname you can simply use:
```
2019-07-16 20:03:26 +00:00
$ xmpp-check chat.sum7.eu
info All checks passed
⇢ address="chat.sum7.eu" domain=""
⇢ main.go:43 main.runCheck
⇢ 2019-07-16T22:01:39.765+02:00
2019-05-16 16:09:39 +00:00
```
You can also pass the port and the XMPP domain if different from the server hostname:
```
2019-07-16 20:03:26 +00:00
$ xmpp-check chat.sum7.eu:5222 --domain meckerspace.de
info All checks passed
⇢ address="chat.sum7.eu:5222" domain="meckerspace.de"
⇢ main.go:43 main.runCheck
⇢ 2019-07-16T22:01:33.270+02:00
2019-05-16 16:09:39 +00:00
```
Error code will be non-zero in case of error. You can thus use it directly with your usual
monitoring scripts.