Add uptime-kuma push url for restic #203

Merged
reynir merged 2 commits from restic-uptime-kuma into main 2024-03-06 12:29:45 +00:00
Owner

I set up a push monitor in our uptime kuma and created a script for restic that calls the push monitor url on successful backup. I already deployed it.

I set up a push monitor in our uptime kuma and created a script for restic that calls the push monitor url on successful backup. I already deployed it.
reynir added 1 commit 2024-03-05 08:57:17 +00:00
reynir added 1 commit 2024-03-05 08:58:04 +00:00
Author
Owner

We can add a ?ping=XYZ parameter to the URL with the time it took to run the backup. Resticker has PRE_COMMANDS environment variable with commands to run before backup. The PRE_COMMANDS and POST_COMMANDS_* are run using eval (I know, right?!). So we can set up PRE_COMMANDS: "export RESTIC_UPTIME_KUMA_START=date +%d" and then in success.sh do calculations on how long it took to do the backup.

Probably we want to separate the url from the uptime kuma token in the ansible vault

We can add a `?ping=XYZ` parameter to the URL with the time it took to run the backup. Resticker has `PRE_COMMANDS` environment variable with commands to run before backup. The `PRE_COMMANDS` and `POST_COMMANDS_*` are run using [eval](https://github.com/djmaze/resticker/blob/553cd0db39260f47f85af40c280cebe07a52a1de/backup#L6) (I know, right?!). So we can set up `PRE_COMMANDS: "export RESTIC_UPTIME_KUMA_START=date +%d"` and then in `success.sh` do calculations on how long it took to do the backup. Probably we want to separate the url from the uptime kuma token in the ansible vault
reynir merged commit ebf3608bdc into main 2024-03-06 12:29:45 +00:00
reynir deleted branch restic-uptime-kuma 2024-03-06 12:29:45 +00:00
Author
Owner

I merged this as I already deployed it. There is definitely room for improvement, but we can defer that to another PR.

I merged this as I already deployed it. There is definitely room for improvement, but we can defer that to another PR.
Sign in to join this conversation.
No description provided.