[bradm, r=gnuoy] Add haproxy nrpe checks and setting of nagios_servicegroups

This commit is contained in:
Liam Young 2015-02-26 10:57:06 +00:00
commit 61ccd7df7f
2 changed files with 8 additions and 0 deletions

View File

@ -220,4 +220,10 @@ options:
juju-myservice-0
If you're running multiple environments with the same services in them
this allows you to differentiate between them.
nagios_servicegroups:
default: ""
type: string
description: |
A comma-separated list of nagios servicegroups.
If left empty, the nagios_context will be used as the servicegroup

View File

@ -457,7 +457,9 @@ 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.add_init_service_checks(nrpe_setup, services(), current_unit)
nrpe.add_haproxy_checks(nrpe_setup, current_unit)
nrpe_setup.write()