claha / smart-home

Infrastructure as Code. I have spoken. This is the way.
MIT License
1 stars 0 forks source link

Healthchecks #8

Closed claha closed 1 year ago

claha commented 1 year ago

Host one or two instances on oci using https://github.com/healthchecks/healthchecks.

To call the endpoint perhaps this could be useful https://github.com/bdd/runitor.

claha commented 1 year ago

Healthchecks.io instances deployed on oci0 and oci1, currently they are configured manually but once this ansible role gets support for self-hosted instances that could be used to setup checks. (https://github.com/ansible-collections/community.healthchecksio)

When working on #6 they scripts should call an healthchecks endpoint

claha commented 1 year ago

It is easy to call the healthchecks endpoint with autorestic (https://autorestic.vercel.app/examples), so no need for runitor and backups are currently the only use for the healthchecks that I see.

claha commented 1 year ago

Since curl is not available in the autorestic docker image something like this needs to be done

docker compose run autorestic bash -c "apk add curl && autorestic backup --verbose --location homeassistant"

claha commented 1 year ago

Since it seems a bit hard to integrate telegram with healtchecks (need ssl which I dpn't want to do right now). I will use gatus to ping the healthchecks api and trigger notifications that way.

claha commented 1 year ago

Got something that works but coudl (and will) be improved.