Add default extensions
This commit is contained in:
parent
41379e36df
commit
219bcf8a12
5 changed files with 75 additions and 31 deletions
|
@ -14,21 +14,22 @@ Then create a `services.json` file for your config, like this:
|
|||
|
||||
```json
|
||||
{
|
||||
"global-args": {
|
||||
"default-checker": "CheckerTemplate",
|
||||
"default-alerts": "AlertsTemplate",
|
||||
"default-logging": "LoggingTemplate"
|
||||
},
|
||||
"site": {
|
||||
"name": "A Website",
|
||||
"checker": "CheckerTemplate",
|
||||
"checker": "HttpChecker",
|
||||
"checker-args": {
|
||||
"url": "https://example.net",
|
||||
"port": 443,
|
||||
"lol": "CheckerTemplate ignores these options lol"
|
||||
"url": "https://example.com"
|
||||
},
|
||||
"rate": 1,
|
||||
"alerts": "AlertsTemplate",
|
||||
"alerts-args": {
|
||||
"url": "https://example.com/webhook-url-or-whatever-goes-here",
|
||||
"lol": "irrelevant, AlertsTemplate ignores these options lol"
|
||||
},
|
||||
"logging": "LoggingTemplate",
|
||||
"logging-args": {
|
||||
"file": "/home/askiiart/Documents/updog/logs/site-log"
|
||||
}
|
||||
|
@ -36,15 +37,25 @@ Then create a `services.json` file for your config, like this:
|
|||
}
|
||||
```
|
||||
|
||||
#### Global config
|
||||
|
||||
Optional arguments:
|
||||
|
||||
- `default-checker`: The default checker for all services, can be overriden per-service using `checker`
|
||||
- `default-alerts`: The default alerter extension for all services, can be overriden per-service using `alerts`
|
||||
- `default-logging`: The default logging extension for all services, can be overriden per-service using `logging`
|
||||
|
||||
#### Service config
|
||||
|
||||
Required arguments:
|
||||
|
||||
- The key (in this case `site`): A unique string to identify the service in logs, also used internally.
|
||||
- `checker`: The name of the checker extension's *class*.
|
||||
- `checker`: The name of the checker extension's *class* - optional if `default-checker` is specified in the global arguments.
|
||||
- `checker-args`: Arguments for the checker. Check the checker's docs for what to put here.
|
||||
- `rate`: How often to check if the service is up (every *x* seconds)
|
||||
- `alerts`: The name of the alerting extension's *class*.
|
||||
- `alerts`: The name of the alerting extension's *class* - optional if `default-alerts` is specified in the global arguments.
|
||||
- `alerts-args`: Arguments for the alerting extension. Check the alerter's docs for what to put here.
|
||||
- `logging`: The name of the logging extension's *class*.
|
||||
- `logging`: The name of the logging extension's *class* - optional if `default-logging` is specified in the global arguments.
|
||||
- `logging-args`: Arguments for the logging extension. Check the logger's docs for what to put here.
|
||||
|
||||
Optional arguments:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue