Select Supported Platforms

Select Supported Architectures

Select Tier

Github Name


v0.0.2 · public · Published 17 days ago

README
Asset Definition
Release Notes
Release Assets

Sensu Bonsai Asset
goreleaser

sensu-django-healthcheck

Table of Contents

Overview

This is a simple health check for Django 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.

Django Health Check

{
  "Cache backend: default": "working",
  "DatabaseBackend": "working",
  "DefaultFileStorageHealthCheck": "working",
  "MigrationsHealthCheck": "working",
  "ProductsHealthCheckBackend": "working"
}

Files

  • sensu-django-healthcheck

Usage examples

sensu-django-healthcheck -u https://example.com/health/?format=json

all checks are working: map[Cache backend: default:working DatabaseBackend:working DefaultFileStorageHealthCheck:working MigrationsHealthCheck:working ProductsHealthCheckBackend:working]%

Help:

sensu-django-healthcheck -h

Usage:
  sensu-django-healthcheck [flags]
  sensu-django-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-django-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-django-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-django-healthcheck].

Check definition

---

type: CheckConfig
api_version: core/v2
metadata:
  name: sensu-check-http-json
  namespace: default
spec:
  command: sensu-django-healthcheck -u https://example.com/health/?format=json
  subscriptions:

- system
  runtime_assets:
- DoctorOgg/sensu-check-http-json

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

×

There are no asset definitions for this version, only source code:

Download Source Cancel