simple healthchecks.io monitoring
cleanup unused checkup monitoring
This commit is contained in:
parent
fb88d1dab2
commit
b22ff9f6ae
16
README.md
16
README.md
|
@ -44,6 +44,22 @@ Continue with "Odoo PoS configuration"
|
|||
|
||||
More hardware description and a network diagram: tbd.
|
||||
|
||||
## Monitoring
|
||||
|
||||
There are two kinds of monitoring prepared: The cluster itself and the PoS
|
||||
application.
|
||||
|
||||
### Simple Cluster Healthcheck
|
||||
|
||||
Under `contrib/healthchecks-cronjob.yaml` a simple Kubernetes cronjob is
|
||||
provided which regularly pings [Healthchecks.io](https://healthchecks.io/).
|
||||
|
||||
A secret with the ping URL needs to be added before the CronJobs does it's work:
|
||||
|
||||
```
|
||||
kubectl -n hc create secret generic healthchecks-io --from-literal=HCURL=https://hc-ping.com/MYUUID
|
||||
```
|
||||
|
||||
## Backup configuration
|
||||
|
||||
Example contents of `backup.env`:
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
"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"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
apiVersion: batch/v1beta1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: healthchecks-io
|
||||
namespace: hc
|
||||
spec:
|
||||
schedule: "*/1 * * * *"
|
||||
concurrencyPolicy: Forbid
|
||||
successfulJobsHistoryLimit: 1
|
||||
failedJobsHistoryLimit: 1
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: pinghc
|
||||
env:
|
||||
- name: HCURL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: healthchecks-io
|
||||
key: HCURL
|
||||
image: busybox
|
||||
args:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- "date && echo $HCURL && /bin/wget -q -O - --no-check-certificate $HCURL"
|
||||
restartPolicy: OnFailure
|
||||
|
|
@ -62,14 +62,6 @@ 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:
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
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
|
Reference in New Issue