Fix haproxy nrpe checks
From stable/18.02 onwards, charmhelpers symlink has been removed from the hooks directory. On fresh deploys, this caused check_haproxy* scripts not to be copied to /usr/local/lib/nagios/plugins. This change uses new copy_nrpe_checks arg available to choose a different location than the default. Change-Id: Ia0a78dd2ace60dd77e81382b8018c04bbc0e2ebf Closes-Bug: 1796830 Signed-off-by: Alvaro Uria <alvaro.uria@canonical.com>
This commit is contained in:
parent
1fff65bd5b
commit
65c90e7c27
|
@ -730,7 +730,13 @@ def update_nrpe_config():
|
|||
hostname = nrpe.get_nagios_hostname()
|
||||
current_unit = nrpe.get_nagios_unit_name()
|
||||
nrpe_setup = nrpe.NRPE(hostname=hostname)
|
||||
nrpe.copy_nrpe_checks()
|
||||
nrpe_files_dir = os.path.join(
|
||||
os.getenv('CHARM_DIR'),
|
||||
'charmhelpers',
|
||||
'contrib',
|
||||
'openstack',
|
||||
'files')
|
||||
nrpe.copy_nrpe_checks(nrpe_files_dir)
|
||||
nrpe.add_init_service_checks(nrpe_setup, services(), current_unit)
|
||||
nrpe.add_haproxy_checks(nrpe_setup, current_unit)
|
||||
api_port = determine_api_port(config('bind-port'),
|
||||
|
|
Loading…
Reference in New Issue