the ollect_rabbitmq_stats.sh file correctly
creates and uses a tempfile, except it writes
the colums headers to DATA_FILE, which is both
non-atomic and overwritten a few lines later with a mv.
Change-Id: I59a9279e67da26b483a0cac539abc8e40da3622b
Closes-Bug: #1806635
Note that, for PY3, the unbuffered IO in the check_rabbitmq.py script
has to be switched off as PY3 doesn't support unbuffered IO for text
(think str) rather than binary byte streams.
Change-Id: I79af54cdbd7381f88732b24f65e94451350b9ab9
Closes-Bug: #1804349
Closes-Bug: #1804348
* This fixes the incorrect syntax in the scripts/check_rabbitmq.py
file. Unfortunately, there are no tests for these files. To
help with QA, added the 'scripts' directory to the pep8 test to
validate that they are correct python syntax for future changes.
* Updated .gitigore to exclude __pycache__ directories for py3 and
removed the __pycache__ directory files from the repo.
Change-Id: I406a70c3d04eb730e1c59189a83cc57495186105
Closes-Bug: #1804126
This patch enables checks of rabbitmq when SSL is enabled, when ssl
config option is set to 'on' both ports (5672 and 5671) will be
checked.
Change-Id: Ia0bab1dca65112cd06ae382f6ebc1cc280d7b130
Closes-Bug: 1687916
This commit introduces the check_rabbitmq_cluster.py Nagios check, which
uses the HTTP management API to check for the presence of cluster
partitions. The check will only be installed if the management_plugin
charm configuration is set to True, enabling the HTTP API plugin.
The previous request to use administrator privileges to monitor cluster
health is no longer required. The create_user and user_exists logic has
been reworked to accomodate different tags, and the monitoring tag,
which is respected by the HTTP management API used to monitor cluster
health, has been used instead of the administrator privilege.
Also cleans up usage of os.getenv('CHARM_DIR') in several places in the
file hooks/rabbitmq_server_relations.py
Change-Id: Ib7eb1afe258931cc917c151a2b6d72dc56d30c95
Closes-Bug: #1548679
collect_rabbitmq_stats.sh creates
/var/lib/rabbitmq/data/{}_queue_stats.dat with 600 perms which
cannot be read by the monitoring user. This bug was introduced by
a8f7dea1 which uses mktemp which creates the file with restricted
permissions.
Change-Id: Idf3022bf925dd02b4bb6c979980ec1c6211b6923
Closes-Bug: #1730604
This change updates the stats collection script so it writes to a
temporary file before updating the main stats file to ensure that
the update is an atomic operation.
Change-Id: I68d4e3e723ed62fb5e90ba6bcf284c432ba9cd6b
Closes-Bug: #1569143