License
MIT License
v0.0.2 · public · Published 2 months ago
This is a simple health check for FastAPI AppSumo applications. It makes a GET request to the specified URL and expects a JSON response. If the response contains all keys with value "working", the check passes.
{
"status":"ok",
"backends":
{
"Cache backend: default":"working",
"DatabaseBackend":"working",
"DefaultFileStorageHealthCheck":"working",
"MigrationsHealthCheck":"working",
"ProductsHealthCheckBackend":"working"
}
}
sensu-fastapi-appsumo-healthcheck -u https://example.com/api/v1/health
Help:
sensu-fastapi-appsumo-healthcheck -h
Check FastAPI AppSumo health status
Usage:
sensu-fastapi-appsumo-healthcheck [flags]
sensu-fastapi-appsumo-healthcheck [command]
Available Commands:
help Help about any command
version Print the version number of this plugin
Flags:
-d, --debug Enable debug mode
-h, --help help for sensu-fastapi-appsumo-healthcheck
-i, --insecure-skip-verify Skip TLS certificate verification (not recommended!)
-T, --timeout int Request timeout in seconds (default 15)
-u, --url string URL to test (default "http://localhost:80/")
[Sensu Assets][10] are the best way to make use of this plugin. If you're not using an asset, please consider doing so! If you're using sensuctl 5.13 with Sensu Backend 5.13 or later, you can use the following command to add the asset:
sensuctl asset add DoctorOgg/sensu-fastapi-appsumo-healthcheck
If you're using an earlier version of sensuctl, you can find the asset on the [Bonsai Asset Index][https://bonsai.sensu.io/assets/DoctorOgg/sensu-fastapi-appsumo-healthcheck].
---
api_version: core/v2
type: CheckConfig
metadata:
name: check-api
labels:
sensu.io/workflow: ci_action
spec:
runtime_assets:
- sensu-django-healthcheck
command: sensu-django-healthcheck -u https://example.com/api/v1/health
subscriptions:
- ecs-worker
interval: 120
round_robin: true
proxy_entity_name: round_robin
handlers:
- notify_all
Please describe the reason for reporting this asset. Our moderators will be notified and will disable the asset if it is found to be inappropriate.
×