Skip to main content

Additional health checks for django-alive

Project description

django-alive-checks is a Django application that provides additional health checks for your Django projects. These checks are designed to work with the django-alive package but include dependencies that cannot be part of django-alive itself.

Installation

You can install the base package with:

pip install django-alive-checks

If you want to include support for Elasticsearch, install with:

pip install django-alive-checks[elasticsearch]

Integration with django-alive

To integrate the check_elasticsearch function with your django-alive checks, you can add it to your health checks configuration:

# settings.py

ALIVE_CHECKS = [
    ...
    ("alive_checks.checks.check_elasticsearch", {"settings": ES_SETTINGS}),
]

Where the ES_SETTINGS contains settings that you pass to elsaticsearch.Elasticsearch.

Testing

To run the tests for this project:

python -m unittest discover

The tests cover the following scenarios:

  • Successful connection to Elasticsearch.

  • Failed connection to Elasticsearch.

  • Exceptions during connection attempts.

  • Handling the absence of the elasticsearch package.

Contributing

Contributions are welcome! If you encounter any issues, have ideas for improvements, or want to add more checks, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Acknowledgments

Thanks to the Django and Elasticsearch communities for their continued support and development of the libraries that make this project possible.

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_alive_checks-0.1.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

django_alive_checks-0.1-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

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