Healthchecks
Interact with Healthchecks app
Website
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

1
key = "123456-123456-12455"
2
naas_drivers.healthcheck.connect(key).send("start")
Copied!

Done

1
key = "123456-123456-12455"
2
naas_drivers.healthcheck.connect(key).send()
Copied!

Fail

1
key = "123456-123456-12455"
2
naas_drivers.healthcheck.connect(key).send("fail")
Copied!

Check url

1
url = "https://google.com"
2
key = "123456-123456-12455"
3
naas_drivers.health_check.connect(key).check_up(url)
Copied!

Connect

You can also save your connection and don't repeat it for each method.
1
key = "123456-123456-12455"
2
healthcheck = naas_drivers.healthcheck.connect(key)
3
healthcheck.send()
Copied!

Official documentation