Skip to main content

Application that provides an API to check the status of some parts and some utilities like ping.

Project description

Version:
1.0.3
Status:
Production/Stable
Author:

José Antonio Perdiguero López

Django Status is a application for Django projects that provides an API to check the status of some parts and some utilities like ping requests.

Quick start

  1. Install this package using pip:

    pip install django-status
  2. Add status to your INSTALLED_APPS settings like this:

    INSTALLED_APPS = (
        ...
        'status',
    )
  3. Add Django-status urls to your project urls:

    urlpatterns = [
        ...
        url(r'^status/', include('status.urls')),
    ]

Check Providers

Django Status provides a mechanism to add new custom check functions through check providers. Each check provider will generate a new API method with an URL that uses the name of the provider. These functions must accept *args and **kwargs and will return a JSON-serializable object through json.dumps() method, for example a ping function:

def ping(*args, **kwargs):
    return {'pong': True}

By default Django status provides the follow checks:

Ping

A ping to application. URL: /api/ping

Databases

Check if databases are running. URL: /api/databases

Databases stats

Show stats for all databases. URL: /api/databases/stats

Caches

Check if caches are running. URL: /api/caches

Celery

Check if celery workers defined in settings are running. URL: /api/celery

Celery stats

Show celery worker stats. URL: /api/celery/stats

Settings

STATUS_CHECK_PROVIDERS

List of additional check providers. Each provider consists in a tuple of name, function complete path, args and kwargs. Example:

STATUS_CHECK_PROVIDERS = (
    ('test', 'application.module.test_function', [1, 2], {'foo': 'bar'}),
)

Default:

STATUS_CHECK_PROVIDERS = ()

STATUS_CELERY_WORKERS

List of hostname from celery workers to be checked. Default:

STATUS_CELERY_WORKERS = ()

Changes

v1.0.3 - 14/10/2015
  • Fix checkers for celery and celery stats. Now displays if a worker isn’t running.

v1.0.2 - 14/10/2015
  • Update README and meta info.

v1.0.0 - 14/10/2015
  • Database check.

  • Database stats.

  • Cache check.

  • Celery check.

  • Celery stats.

  • First stable version.

v0.1.0 - 8/10/2015
  • Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-status-1.0.3.tar.gz (11.8 kB view details)

Uploaded Source

File details

Details for the file django-status-1.0.3.tar.gz.

File metadata

  • Download URL: django-status-1.0.3.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-status-1.0.3.tar.gz
Algorithm Hash digest
SHA256 72970668c23e14fb6218cc6de783a59e707fa199ea99019651dd0125ad8d6df3
MD5 20e5a79e56d267a85e2acc9d0b7347d9
BLAKE2b-256 68b5c214e51bf0c7f0c5dca40a2612fe6c0b97ebf214a579dc6881648d7128a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page