bundles/powerdns: add monitoring
This commit is contained in:
parent
2fdeeca9c3
commit
e6acda1f52
1 changed files with 27 additions and 0 deletions
|
@ -9,6 +9,15 @@ defaults = {
|
|||
'pdns-backend-pgsql': {},
|
||||
},
|
||||
},
|
||||
'icinga2_api': {
|
||||
'powerdns': {
|
||||
'services': {
|
||||
'POWERDNS PROCESS': {
|
||||
'command_on_monitored_host': '/usr/lib/nagios/plugins/check_procs -C pdns_server -c 1:',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
'powerdns': {
|
||||
'api_key': repo.vault.password_for('{} powerdns api'.format(node.name)),
|
||||
},
|
||||
|
@ -27,6 +36,24 @@ defaults = {
|
|||
}
|
||||
|
||||
|
||||
@metadata_reactor
|
||||
def monitoring_for_primary_nameserver(metadata):
|
||||
if metadata.get('powerdns/is_secondary', False):
|
||||
return {}
|
||||
|
||||
return {
|
||||
'icinga2_api': {
|
||||
'powerdns': {
|
||||
'services': {
|
||||
'POWERDNS WEB INTERFACE': {
|
||||
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_http_url_for_string http://localhost:8081/ "PowerDNS"',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor
|
||||
def get_ips_of_secondary_nameservers(metadata):
|
||||
if metadata.get('powerdns/is_secondary', False):
|
||||
|
|
Loading…
Reference in a new issue