Skip to content

Commit

Permalink
document the new JSON notifier in the README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shtlrs committed Dec 23, 2023
1 parent 82980cf commit d434891
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ like `cron`, or a Kubernetes CronJob.
- [Discord](#discord)
- [Slack](#slack)
- [Telegram](#telegram)
- [Json](#json)
- [Rotation](#rotation)
- [Cooldown](#cooldown)

Expand Down Expand Up @@ -503,8 +504,8 @@ You can also define a custom location (root is App Folder) using the
## Notifiers

`blackbox` also implements different _notifiers_, which is how it reports the
result of one of its jobs to you. Right now we only support **Discord** and **Slack**
and **Telegram**, but if you need a specific notifier, feel free to open an issue.
result of one of its jobs to you. Right now we only support the below listed notifiers,
but if you need a specific notifier, feel free to open an issue.

To configure notifiers, add a section with this format:

Expand Down Expand Up @@ -572,6 +573,39 @@ Modern:
![blackbox](https://github.com/lemonsaurus/blackbox/raw/main/img/blackbox_telegram_fail.png)


### Json
- **Notifier Type**: `json`
- **Required fields**: `url`
- YAML will look like this:
```notifiers:
json:
json_1:
url: https://mydomain.com/api/blackbox-notifications
```
**Note**: All notifications are sent as a `POST` request because the data will live within the request's body.

The body of the HTTP request will look like this

```json
{
"backup-data": [
{
"source": "main_postgres",
"success": true,
"output": "",
"backup": [
{
"name": "main_dropbox",
"success": true
}
]
}
]
}
```


## Rotation

By default, `blackbox` will automatically remove all backup files older than 7
Expand Down

0 comments on commit d434891

Please sign in to comment.