Skip to main content

Utilities for generating conn-check YAML configs from other sources, such as Django settings

Project description

This is a set of Python modules and utilities for generating conn-check config YAML from other sources, such as Django settings modules.

Supported sources

  • Django settings modules

Usage

Django

You can export common settings from a Django application using the conn-check-django command line utility, which takes the following arguments:

  • -m, --settings-module: the Python module for Django to import.

  • -d, --database-name: the database schema name if not set as NAME in the Django settings.

  • --statsd-send: Optional string to send with statsd checks (defaults to a conn-check specific metric).

  • --statsd-expect: Optional response string to expect from a statsd check.

Followed by a path to the generated YAML file, for example:

$ conn-check-django -m myapp.settings /tmp/myapp-conncheck.yaml
$ conn-check /tmp/myapp-conncheck.yaml

Extending configuration generation

You may want to extend the generated checks with custom (or unsupported) settings, this can be done by creating your own script and importing all the functions/variables from the relevant conn_check_configs submodule (e.g. django), and then extending the EXTRA_CHECK_MAKERS list with your own check making functions, which must take 2 arguments: the Django settings module and the options from the CLI (usually a argparse.Namespace instance).

Building wheels

To allow for easier/more portable distribution of this tool you can build conn-check-configs and all it’s dependencies as Python wheels:

make clean-wheels
make build-wheels

The build-wheels make target will build conn-check-configs and it’s base dependencies.

By default all the wheels will be placed in ./wheels.

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

conn-check-configs-1.0.1.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

conn_check_configs-1.0.1-py2-none-any.whl (6.7 kB view details)

Uploaded Python 2

File details

Details for the file conn-check-configs-1.0.1.tar.gz.

File metadata

File hashes

Hashes for conn-check-configs-1.0.1.tar.gz
Algorithm Hash digest
SHA256 adabb07c42628b766a0f2c2c4bac05065efc9b813562636b391097f650ffa497
MD5 c537bcc3cc411b0199a035920435fe7c
BLAKE2b-256 bde61f6ba2dcadfae65f56f09bb06204250ef7b11559a1887d480d3e8d62bcc4

See more details on using hashes here.

File details

Details for the file conn_check_configs-1.0.1-py2-none-any.whl.

File metadata

File hashes

Hashes for conn_check_configs-1.0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 adf09aead09d736f8b121219760c1b3b1f6d4cfb073c1a81442f2783a6257af4
MD5 d6579d5b22faff972f50c739dc906c0b
BLAKE2b-256 ede83904b15a60a64d3d3b59ebcd81de5dd193673bcf3475807e51ecf14e5c1d

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