Ensure nagios is enabled when enabling cluster status checks
Move the installation of the cluster status checking into the conditional that checked with the NRPE directory exists. This ensures that the managment plugin can be installed without the charm being related to Nagios. Change-Id: I998ba7c4b70207bb38f9898046f4e47bcb5723a4 Closes-Bug: 1781582
This commit is contained in:
parent
3bb84b61fc
commit
4d4c998072
@ -605,6 +605,11 @@ def update_nrpe_checks():
|
|||||||
rsync(os.path.join(charm_dir(), 'scripts',
|
rsync(os.path.join(charm_dir(), 'scripts',
|
||||||
'check_rabbitmq_queues.py'),
|
'check_rabbitmq_queues.py'),
|
||||||
os.path.join(NAGIOS_PLUGINS, 'check_rabbitmq_queues.py'))
|
os.path.join(NAGIOS_PLUGINS, 'check_rabbitmq_queues.py'))
|
||||||
|
if config('management_plugin'):
|
||||||
|
rsync(os.path.join(charm_dir(), 'scripts',
|
||||||
|
'check_rabbitmq_cluster.py'),
|
||||||
|
os.path.join(NAGIOS_PLUGINS, 'check_rabbitmq_cluster.py'))
|
||||||
|
|
||||||
if config('stats_cron_schedule'):
|
if config('stats_cron_schedule'):
|
||||||
script = os.path.join(SCRIPTS_DIR, 'collect_rabbitmq_stats.sh')
|
script = os.path.join(SCRIPTS_DIR, 'collect_rabbitmq_stats.sh')
|
||||||
cronjob = CRONJOB_CMD.format(schedule=config('stats_cron_schedule'),
|
cronjob = CRONJOB_CMD.format(schedule=config('stats_cron_schedule'),
|
||||||
|
Loading…
Reference in New Issue
Block a user