You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
arnaucube 9e6470787d first commit 6 years ago
.gitignore first commit 6 years ago
LICENSE Initial commit 6 years ago
README.md first commit 6 years ago
canaryBot first commit 6 years ago
checker.go first commit 6 years ago
config.go first commit 6 years ago
go.mod first commit 6 years ago
go.sum first commit 6 years ago
log.go first commit 6 years ago
main.go first commit 6 years ago
matrix.go first commit 6 years ago

README.md

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