Update usage and README.md

This commit is contained in:
Scott Wallace 2020-10-13 17:26:14 +01:00
parent a1878f840f
commit 4eff8404a7
2 changed files with 26 additions and 2 deletions

View file

@ -1,4 +1,21 @@
This application bridges Alertmanager alerts to [Gotify](https://gotify.net).
This application bridges [Prometheus Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) alerts to [Gotify](https://gotify.net/).
# Usage
```
usage: alertify.py [-h] [-H]
Bridge between Prometheus Alertmanager and Gotify
optional arguments:
-h, --help show this help message and exit
-H, --healthcheck Simply exit with 0 for healthy or 1 when unhealthy
Three environment variables are required to be set:
* GOTIFY_SERVER: hostname of the Gotify server
* GOTIFY_PORT: port of the Gotify server
* GOTIFY_KEY: app token for alertify
```
# Notes
* Listens on port 8080 by default.

View file

@ -127,7 +127,14 @@ if __name__ == '__main__':
"""
Function to parse the CLI
"""
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
description='Bridge between Prometheus Alertmanager and Gotify\n',
epilog='Three environment variables are required to be set:\n'
' * GOTIFY_SERVER: hostname of the Gotify server\n'
' * GOTIFY_PORT: port of the Gotify server\n'
' * GOTIFY_KEY: app token for alertify'
)
parser.add_argument(
'-H', '--healthcheck',