<commit_before>django-server-status
====================

Monitor server status with a healthcheck.

Installation
------------

To get the latest stable release from PyPi

.. code-block:: bash

    pip install django-server-status

To get the latest commit from GitHub

.. code-block:: bash

    pip install -e git+git://github.com/mitodl/django-server-status.git#egg=django-server-status

Add a stanza like this to your settings. Current supported services are 'REDIS', 'ELASTIC_SEARCH', 'POSTGRES', 'CELERY'.

.. code-block:: python

    HEALTH_CHECK = ['REDIS', 'ELASTIC_SEARCH', 'POSTGRES']


Add ``server_status`` to your ``INSTALLED_APPS``

.. code-block:: python

    INSTALLED_APPS = (
        ...,
        'server_status',
    )

Add the ``server_status`` URLs to your ``urls.py``

.. code-block:: python

    urlpatterns = patterns('',
        ...
        url(r'^status/', include('server_status.urls')),
    )


Release Notes
-------------

0.3: Added status_all property to the status results JSON.
0.2: Support for celery validation.<commit_msg>Use modern urlpatterns syntax<commit_after>django-server-status
====================

Monitor server status with a healthcheck.

Installation
------------

To get the latest stable release from PyPi

.. code-block:: bash

    pip install django-server-status

To get the latest commit from GitHub

.. code-block:: bash

    pip install -e git+git://github.com/mitodl/django-server-status.git#egg=django-server-status

Add a stanza like this to your settings. Current supported services are 'REDIS', 'ELASTIC_SEARCH', 'POSTGRES', 'CELERY'.

.. code-block:: python

    HEALTH_CHECK = ['REDIS', 'ELASTIC_SEARCH', 'POSTGRES']


Add ``server_status`` to your ``INSTALLED_APPS``

.. code-block:: python

    INSTALLED_APPS = (
        ...,
        'server_status',
    )

Add the ``server_status`` URLs to your ``urls.py``

.. code-block:: python

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


Release Notes
-------------

0.3: Added status_all property to the status results JSON.
0.2: Support for celery validation.
{'fraction_non_alphanumeric': 0.16077322017916076, 'fraction_numerical': 0.003771805752003772, 'mean_word_length': 3.0342205323193916, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6453203', 'n_tokens_mistral': 679, 'n_tokens_neox': 639, 'n_words': 189}