Add Makefile
[vaultmon/.git] / README.md
1 # Vault Monitor
2
3 Monitor connection status and cluster status of [Vault][1] and [Etcd][2] in our
4 infrastructure and report issues on Slack.
5
6 For the 2 components, it does HTTP/HTTPS connections in order to:
7
8 * Test health and aliveness
9 * Test cluster status
10
11 If tests are failing, it will notify a message on the configured slack
12 channel.
13
14 # Build Instructions
15
16 ## Build Go binary
17
18 ```
19 git clone git@github.com:Nitro/vaultmon $GOPATH/src/github.com/Nitro/vaultmon
20 cd !$
21 GOOS=linux go build
22 ```
23
24 ## Build Docker container
25
26 ```
27 ./build.sh or bash -x build.sh --no-cache
28 ```
29
30 # Required Env Vars
31
32 * `MONITOR_VAULT_URL`: HTTPS Vault Address (Format URL:PORT)
33 * `MONITOR_ETCD_URL`: HTTP Etcd Address  (Format URL:PORT)
34 * `MONITOR_SLACKWEBHOOK_URL`: HTTPS Slack Webhook URL
35 * `MONITOR_SLACK_CHANEL`: Slack channel
36 * `MONITOR_VERBOSE`: Enable debug logs
37
38 # Example
39
40 ```
41 cat <<EOF >vars
42 MONITOR_VAULT_URL=https://vault-address:8200
43 MONITOR_ETCD_URL=http://etcd-address:2379
44 MONITOR_SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxx/yyy
45 MONITOR_SLACK_CHANNEL="#channel"
46 MONITOR_VERBOSE=1
47 EOF
48
49 docker run --env-file vars gonitro/vaultmon:latest
50 ```
51
52 [1]: https://github.com/hashicorp/vault
53 [2]: https://github.com/coreos/etcd