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.2.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 2

File details

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

File metadata

File hashes

Hashes for conn-check-configs-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6b04235d483620f1c6acd0da06a0e0bf2ce8b89b56486e796fb3e9e2d4f5a025
MD5 ff4d223ff597700ac3b52e7419c5c207
BLAKE2b-256 a5244a0c7fea7b1c39571dde77ed70fd29af3a0feb4fed98d143d80add8d311a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for conn_check_configs-1.0.2-py2-none-any.whl
Algorithm Hash digest
SHA256 92bd430c8a7459246af6a25c97f3e6593bb08a5ee8f00b03634ae0f48d4a2238
MD5 7ff8b513e630cf7758a8d2676b22c7cb
BLAKE2b-256 1b9a6ff31489a8095079ee884396f73c1feb16aee74ea531d3b397930ffd2a98

See more details on using hashes here.

Supported by

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