No description
Find a file
2018-10-14 20:33:30 +02:00
.gitignore first commit 2018-10-14 20:33:30 +02:00
canaryBot first commit 2018-10-14 20:33:30 +02:00
checker.go first commit 2018-10-14 20:33:30 +02:00
config.go first commit 2018-10-14 20:33:30 +02:00
go.mod first commit 2018-10-14 20:33:30 +02:00
go.sum first commit 2018-10-14 20:33:30 +02:00
LICENSE Initial commit 2018-10-14 20:32:42 +02:00
log.go first commit 2018-10-14 20:33:30 +02:00
main.go first commit 2018-10-14 20:33:30 +02:00
matrix.go first commit 2018-10-14 20:33:30 +02:00
README.md first commit 2018-10-14 20:33:30 +02:00

canaryBot

Bot to check if services are alive. Current bots:

  • Matrix (Riot)

Config

File config.json

{
  "matrix": {
    "room_id": "!zzzzz:mmmmmm.ooo",
    "user": "aaaaa",
    "password": "xxxxx",
    "server": "https://sssss.ooo"
  },
  "services": [{
      "name": "name01",
      "url": "http://127.0.0.1:80",
      "statusCode": 200
    },
    {
      "name": "service02",
      "url": "http://127.0.0.1:7000/api",
      "statusCode": 200
    }
  ],
  "sleepTime": 30,
  "retry": 5
}
  • sleepTime: time between each request to the services
  • retry: after X times failing, restart the counter

Run

./canaryBot