Git Product home page Git Product logo

healthy_django's Introduction

healthy_django

Simple Re Usable tool for Django Healthchecks

Documentation

Quickstart

Install healthy_django:

pip install healthy_django

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'healthy_django',
    ...
)

Add healthy_django's URL patterns:

urlpatterns = [
    ...
    path("health/", include("healthy_django.urls", namespace="healthy_django")),
    ...
]

Add list of healthcheck plugins the currently supported plugins along with their spec and settings config.

Add the configs to your settings file as needed

Django Database Health Check
Checks if a Database defined in Django is up and running

Config:

from healthy_django.healthcheck.django_database import DjangoDatabaseHealthCheck
...
DjangoDatabaseHealthCheck(
    "Database",
    slug="database",
    connection_name="insert_connection_name_here"
),
...
Django Cache Health Check
Checks if a Cache defined in Django is up and running

Config:

from healthy_django.healthcheck.django_cache import DjangoCacheHealthCheck
...
DjangoCacheHealthCheck("Cache", slug="cache", connection_name="insert_connection_name_here"),
...
Redis based Celery Queue Health Check
Checks if a Celery queue backlog is within given limits

Config:

from healthy_django.healthcheck.celery_queue_length import (
    DjangoCeleryQueueLengthHealthCheck,
)
...
DjangoCeleryQueueLengthHealthCheck(
    "CeleryQueue",
    slug="celery",
    broker="insert_celery_broker_url_here",
    queue_name="insert_celery_queue_name_to_be_monitored",
    info_length=env.int("CELERY_HEALTH_INFO_LENGTH", default=25),  # Expecting integer data field here
    warning_length=env.int("CELERY_HEALTH_WARN_LENGTH", default=50),  # Expecting integer data field here
    alert_length=env.int("CELERY_HEALTH_ALERT_LENGTH", default=100),  # Expecting integer data field here
),
...
AWS SQS Queue Health Check
Checks if an AWS SQS queue backlog is within given limits

Access the overall data using a GET request to:

{{http_mode}}://{{domain_name}}/health/

Access the individual data using a GET request to:

{{http_mode}}://{{domain_name}}/health/{{slug}}

Features

Non ORM Based Database Tests
RabbitMQ Queue Length Test
S3 file test

Credits

Made with Love by SecurityAdvisor

healthy_django's People

Contributors

libinmv avatar vigneshhari avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.