Franziska Kunsmann
bd10dc578f
Some checks failed
kunsi/bundlewrap/pipeline/head There was a failure building this commit
We don't care about what the DNS provider said when updating the ip address. The only thing we care about is wether the current external ip of the system matches the resolved ip address.
47 lines
1.3 KiB
Python
47 lines
1.3 KiB
Python
defaults = {
|
|
'apt': {
|
|
'packages': {
|
|
'ppp': {},
|
|
'pppoe': {},
|
|
'python3-requests': {},
|
|
'python3-netifaces': {},
|
|
'ndisc6': {},
|
|
},
|
|
},
|
|
'cron': {
|
|
'restart-pppoe-if-no-public-ip': '*/5 * * * * root /usr/local/bin/restart-pppoe-if-no-public-ip',
|
|
},
|
|
'icinga2_api': {
|
|
'pppd': {
|
|
'services': {
|
|
'PPPD PROCESS': {
|
|
'command_on_monitored_host': '/usr/lib/nagios/plugins/check_procs -C pppd -c 1:',
|
|
},
|
|
'PPPOE PROCESS': {
|
|
'command_on_monitored_host': '/usr/lib/nagios/plugins/check_procs -C pppoe -c 1:',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
|
|
@metadata_reactor.provides(
|
|
'icinga2_api/pppd/services',
|
|
)
|
|
def icinga_dyndns(metadata):
|
|
if not metadata.get('pppd/dyndns', {}):
|
|
return {}
|
|
|
|
return {
|
|
'icinga2_api': {
|
|
'pppd': {
|
|
'services': {
|
|
'DYNDNS UPDATE': {
|
|
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_dyndns_update',
|
|
'vars.notification.mail': True,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|