bundles/postfix: add SPAM BLOCKLIST check for every non-private IP attached to the server
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
b99176be49
commit
fdcec012f3
3 changed files with 109 additions and 0 deletions
|
@ -4,6 +4,7 @@ defaults = {
|
|||
'apt': {
|
||||
'packages': {
|
||||
'postfix': {},
|
||||
'python3-dnsq': {},
|
||||
},
|
||||
},
|
||||
'icinga2_api': {
|
||||
|
@ -91,3 +92,28 @@ def iptables(metadata):
|
|||
'port_rules': rules,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'icinga2_api/postfix/services',
|
||||
)
|
||||
def icinga2(metadata):
|
||||
services = {}
|
||||
|
||||
for ip_type in repo.libs.tools.resolve_identifier(repo, node.name).values():
|
||||
for ip in ip_type:
|
||||
if not ip.is_private:
|
||||
services[f'SPAM BLOCKLIST {ip}'] = {
|
||||
'command_on_monitored_host': f'/usr/local/share/icinga/plugins/check_spam_blocklist {ip}',
|
||||
'vars.sshmon_timeout': 60,
|
||||
'check_interval': '15m',
|
||||
'retry_interval': '5m',
|
||||
}
|
||||
|
||||
return {
|
||||
'icinga2_api': {
|
||||
'postfix': {
|
||||
'services': services,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue