Healthchecks

Interact with Healthchecks app

If you are in Naas.ai cloud it's already setup, otherwise

HC_API : this should be set as env vars.

this should connect to this docker machine :

Start

key = "123456-123456-12455"
naas_drivers.healthcheck.connect(key).send("start")

Done

key = "123456-123456-12455"
naas_drivers.healthcheck.connect(key).send()

Fail

key = "123456-123456-12455"
naas_drivers.healthcheck.connect(key).send("fail")

Check url

url = "https://google.com"
key = "123456-123456-12455"
naas_drivers.health_check.connect(key).check_up(url)

Connect

You can also save your connection and don't repeat it for each method.

key = "123456-123456-12455"
healthcheck = naas_drivers.healthcheck.connect(key)
healthcheck.send()

Official documentation