diff --git a/.gitignore b/.gitignore index 8438213..dd6e17c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ backup.env +checkup.json diff --git a/checkup.json.example b/checkup.json.example new file mode 100644 index 0000000..486f984 --- /dev/null +++ b/checkup.json.example @@ -0,0 +1,44 @@ +{ + "checkers": [ + { + "type": "http", + "endpoint_name": "Mikrotik Access Point", + "endpoint_url": "http://192.168.233.1" + }, + { + "type": "http", + "endpoint_name": "Odoo", + "endpoint_url": "http://10.5.0.2:8069" + }, + { + "type": "http", + "endpoint_name": "PosBox", + "endpoint_url": "http://10.5.0.3:8069" + }, + { + "type": "tcp", + "endpoint_name": "Printer 1", + "endpoint_url": "192.168.233.3:80" + }, + { + "type": "tcp", + "endpoint_name": "Printer 2", + "endpoint_url": "192.168.233.5:80" + }, + { + "type": "tcp", + "endpoint_name": "PoS Tablet", + "endpoint_url": "192.168.233.49:80" + } + ], + "storage": { + "provider": "github", + "access_token": "HIDDEN", + "repository_owner": "tobru", + "repository_name": "fwu-pos-statuspage", + "committer_name": "Checkup on PoS", + "committer_email": "pos@feuerwehrurdorf.ch", + "branch": "gh-pages", + "dir": "updates" + } +} diff --git a/docker-compose.yml b/docker-compose.yml index ff985ee..0d281a6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -47,6 +47,14 @@ services: networks: localnet: ipv4_address: 10.5.0.5 + monitoring: + build: ./monitoring + command: checkup every 10m + volumes: + - ./checkup.json:/opt/checkup/checkup.json:ro + networks: + localnet: + ipv4_address: 10.5.0.6 volumes: odoo-web-data: odoo-db-data: diff --git a/monitoring/Dockerfile b/monitoring/Dockerfile new file mode 100644 index 0000000..6ddf4c1 --- /dev/null +++ b/monitoring/Dockerfile @@ -0,0 +1,7 @@ +FROM golang:1.10-alpine + +RUN set -x; apk add --no-cache git build-base && \ + go get -v -u github.com/sourcegraph/checkup/cmd/checkup && \ + mkdir -p /opt/checkup + +WORKDIR /opt/checkup