Expose health check API
-
The documentation isn’t super clear but it appears there is no way to poll the health check of apps via the API or otherwise programmatically, correct?
I’d like to monitor them with uptime kuma since the error page of apps when they fail to start properly would resolve regularly and therefore not trigger an outage warning with uptime kuma.
-
Hello @andreasdueren
You can use the https://$CLOUDRON_DOMAIN/api/v1/apps/{APPID} - API DOC LINK API route to get thehealthandrunStateof an app.Example with my.demo.cloudron.io:
curl -s "https://my.demo.cloudron.io/api/v1/apps/369f89a2-0e88-4c26-b3e3-8f622b1c5141" -H "Authorization: Bearer 5b28f006a867cba7c7c031553c76058e2054cce65fe27792ead5c85af2f0b6fb" | yq -r .health healthyor
curl -s "https://my.demo.cloudron.io/api/v1/apps/369f89a2-0e88-4c26-b3e3-8f622b1c5141" -H "Authorization: Bearer 5b28f006a867cba7c7c031553c76058e2054cce65fe27792ead5c85af2f0b6fb" | yq -r .runState running
After writing this and reading your post again, are you writing about the
healthCheckPathof theCloudronManifest.json?
So, getting this path via the Cloudron API?
If so, here you go:curl -s "https://my.demo.cloudron.io/api/v1/apps/369f89a2-0e88-4c26-b3e3-8f622b1c5141" -H "Authorization: Bearer 5b28f006a867cba7c7c031553c76058e2054cce65fe27792ead5c85af2f0b6fb" | yq -r .manifest.healthCheckPath / -
Hello @andreasdueren
You can use the https://$CLOUDRON_DOMAIN/api/v1/apps/{APPID} - API DOC LINK API route to get thehealthandrunStateof an app.Example with my.demo.cloudron.io:
curl -s "https://my.demo.cloudron.io/api/v1/apps/369f89a2-0e88-4c26-b3e3-8f622b1c5141" -H "Authorization: Bearer 5b28f006a867cba7c7c031553c76058e2054cce65fe27792ead5c85af2f0b6fb" | yq -r .health healthyor
curl -s "https://my.demo.cloudron.io/api/v1/apps/369f89a2-0e88-4c26-b3e3-8f622b1c5141" -H "Authorization: Bearer 5b28f006a867cba7c7c031553c76058e2054cce65fe27792ead5c85af2f0b6fb" | yq -r .runState running
After writing this and reading your post again, are you writing about the
healthCheckPathof theCloudronManifest.json?
So, getting this path via the Cloudron API?
If so, here you go:curl -s "https://my.demo.cloudron.io/api/v1/apps/369f89a2-0e88-4c26-b3e3-8f622b1c5141" -H "Authorization: Bearer 5b28f006a867cba7c7c031553c76058e2054cce65fe27792ead5c85af2f0b6fb" | yq -r .manifest.healthCheckPath /
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login