Skip to main content

Framework around health checks, smoke tests and diagnoses: monitor your applications and services at runtime.

Project description

hospital is a Python framework to write health checks, smoke tests or diagnoses around applications or services.

Abstract

Health checks are kind of tests, applied to running applications and services:

  • write healtchecks just as you would write tests, using assertions;

  • collect and run healthchecks with test runners;

  • use healthchecks to validate deployments;

  • plug healthchecks in supervision and monitoring tools;

  • in case of incidents, use healthchecks to diagnose problems.

Example

In your project’s root package, have a healthchecks package or module, where you assert your (running) application or service is ok:

import unittest
import hospital

@hospital.healthcheck
class DocumentationHealthCheck(unittest.TestCase):
    def test_http_200(self):
        url = 'http://hospital.readthedocs.org/en/0.6/'
        hospital.assert_http_response(url, status_code=200)

Then you can collect and run the healthchecks with command line or web service. Here is an example with command line:

$ hospital-cli <YOUR-PACKAGE>.healthchecks

Project status

hospital is not full-featured yet. Some important features are in the roadmap. See also vision.

Of course, any ideas, feedback or help are welcome :)

Resources

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

hospital-0.7.zip (28.9 kB view details)

Uploaded Source

File details

Details for the file hospital-0.7.zip.

File metadata

  • Download URL: hospital-0.7.zip
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for hospital-0.7.zip
Algorithm Hash digest
SHA256 f6e68ad46f1c3c79c70c6bef1d5f8d94076dbb69ee736e1eb79f345a7fd0f2a4
MD5 3a9ab5119dbcef76b54a11b2410252ff
BLAKE2b-256 ad8fe33a6279533f5c066af672cce4951fea1ce26c88454b5e4c31ffc38fb2c8

See more details on using hashes here.

Provenance

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