Provides the conn-check tool for checking service connectivity, and enables exposing the results to Nagios
conn-check is a utility for performing network connection verification checks against deployed environments.
This charm handles installing conn-check and providing a configuration via a relation so
that YAML can be automatically handed off to conn-check, e.g. from
The charm also provides the relation required by the NRPE
charm and so can be used with Nagios to run regular checks.
Deploy your application and the subordinate:
juju deploy myapp juju deploy conn-check
Relate them together to install conn-check on the
juju add-relation myapp conn-check
You can also specify a revno (to avoid compatibility changes from always tracking
# Will install from tag conn-check-r86 on lp:~ubuntuone-hackers/conn-check/wheels juju set conn-check revision=86
Configuring your charm to support conn-check
Your charm needs to do 2 things to provide conn-check configuration YAML
to the subordinate to run tests:
- Provide the
- Provide a
conn-check-relation-joinedhook which sets the
config_pathvalue on the relation pointing to a file containing YAML checks (see the conn-check readme for more details on checks).
Configuring as a Nagios check
To use your conn-check config as a regular Nagios check, just relate the conn-check
subordinate to the NRPE subordinate:
# Nagios master to report back to juju deploy nagios central-monitor # Add the local Nagios monitor to your service juju deploy nrpe myapp-nrpe juju add-relation myapp myapp-nrpe # Now tell the Nagios subordinate to run checks with conn-check juju add-relation myapp-nrpe conn-check # And report back to the master juju add-relation myapp-nrpe central-monitor
Running conn-check manually with the provided action
The charm ships with a handy action to run conn-check manually on a unit.
Unfortunately there is a bug
< 1.21 which stops
juju-run from working correctly with subordinates,
so we instead we work around it with
# Assuming your unit name is conn-check/0 juju ssh conn-check/0 'juju-run conn-check/0 actions/run-check'
If you're using juju >= 1.21 you can just use
# Just run checks on conn-check/0 juju run --unit conn-check/0 'actions/run-check' # Run checks on all conn-check units juju run --service conn-check 'actions/run-check'
Virtualenvs and your Python app
Every install of conn-check is installed into it's own virtualenv
so that conn-check's dependencies don't overwrite or conflict with any
system dependencies (e.g. those managed by the main charm or config manager).
- The revno of conn-check to deploy,
HEADis used if not set.
- Extra CLI arguments to pass to conn-check (see the conn-check readme for details).