Select Supported Platforms

Select Supported Architectures

Select Tier

Github Name


DoctorOgg/sensu-fastapi-appsumo-healthcheck

v0.0.1 · public · Published 16 days ago

README
Asset Definition
Release Notes
Release Assets

Sensu Bonsai Asset
goreleaser

sensu-fastapi-appsumo-healthcheck

Table of Contents

Overview

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"
    }
}

Files

  • sensu-fastapi-appsumo-healthcheck

Usage examples

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/")

Configuration

Asset registration

[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].

Check definition

---
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

Are you sure you want to report this asset?

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.

×

You must be signed in to report this asset.

Sign In with Github

Download

×

Either download the source code:

Download Source

Or download the asset definition: