dtr/README.md

113 lines
1.7 KiB
Markdown

# DownTimeRobot
Checks for downtimes of your services, providing notifications and fancy SVG
graphs.
## Installing
```
git clone https://git.sakamoto.pl/laudompat/http.sh dtr
cd dtr
git clone https://git.sakamoto.pl/domi/dtr app
mkdir -p storage/appconfig storage/data storage/reports
```
Afterwards, fill out SMTP settings and `cfg[telegram_bot_token]` if you'd
like to use notifications, and recreate the following file structure under
`storage/appconfig`:
- every_1min.json, every_5min.json, every_30min.json
These files control what tests are done, and in what time interval.
```
[
{
"type": "ping",
"label": "Gateway",
"notify": ["mail"],
"data": {
"addr": "10.21.37.1"
}
},
{
"type": "ping",
"label": "CF 1.1",
"notify": [],
"data": {
"addr": "1.1"
}
},
{
"type": "request",
"label": "sdomi.pl - body",
"notify": [],
"data": {
"url": "https://sdomi.pl",
"method": "GET",
"match": "body",
"string": "sdomi's webpage"
}
},
{
"type": "request",
"label": "sdomi.pl - head",
"notify": [],
"data": {
"url": "https://sdomi.pl",
"method": "GET",
"match": "head",
"string": "(S|s)erver: nginx"
}
},
{
"type": "request",
"label": "sdomi.pl - status",
"notify": ["mail"],
"data": {
"url": "http://sdomi.pl/",
"method": "GET",
"match": "status",
"string": "200"
}
}
]
```
- notify.json
This file controls notification recipient groups.
```
[
{
"type": "mail",
"name": "mail",
"to": [
"asdf@example.com",
"aoeu@example.com"
]
},
{
"type": "telegram",
"name": "group",
"to": [
0
]
}
]
```
- graphs.json
This file controls what is displayed in the web interface.
```
[
"Gateway",
"CF 1.1",
"sdomi.pl - body",
"sdomi.pl - head"
]
```