move SPAM BLOCKLIST check to icinga2 itself
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
somehow, we tend to get false positives if we run that check on the node itself.
This commit is contained in:
parent
70cb460934
commit
d44c87e8a7
5 changed files with 12 additions and 5 deletions
|
@ -106,6 +106,13 @@ object CheckCommand "check_smtp" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object CheckCommand "spam_blocklist" {
|
||||||
|
import "plugin-check-command"
|
||||||
|
import "ipv4-or-ipv6"
|
||||||
|
|
||||||
|
command = [ "/usr/local/share/icinga/plugins/check_spam_blocklist", "$ip$" ]
|
||||||
|
}
|
||||||
|
|
||||||
object CheckCommand "check_usv" {
|
object CheckCommand "check_usv" {
|
||||||
import "plugin-check-command"
|
import "plugin-check-command"
|
||||||
import "ipv4-or-ipv6"
|
import "ipv4-or-ipv6"
|
||||||
|
|
|
@ -86,6 +86,9 @@ files = {
|
||||||
'/usr/local/share/icinga/plugins/check_freifunk_node': {
|
'/usr/local/share/icinga/plugins/check_freifunk_node': {
|
||||||
'mode': '0755',
|
'mode': '0755',
|
||||||
},
|
},
|
||||||
|
'/usr/local/share/icinga/plugins/check_spam_blocklist': {
|
||||||
|
'mode': '0755',
|
||||||
|
},
|
||||||
'/usr/local/share/icinga/plugins/check_usv_snmp': {
|
'/usr/local/share/icinga/plugins/check_usv_snmp': {
|
||||||
'mode': '0755',
|
'mode': '0755',
|
||||||
},
|
},
|
||||||
|
|
|
@ -62,9 +62,6 @@ files = {
|
||||||
'/usr/local/share/icinga/plugins/check_postfix_queue': {
|
'/usr/local/share/icinga/plugins/check_postfix_queue': {
|
||||||
'mode': '0755',
|
'mode': '0755',
|
||||||
},
|
},
|
||||||
'/usr/local/share/icinga/plugins/check_spam_blocklist': {
|
|
||||||
'mode': '0755',
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
actions = {
|
actions = {
|
||||||
|
|
|
@ -137,8 +137,8 @@ def icinga2(metadata):
|
||||||
for ip in ip_type:
|
for ip in ip_type:
|
||||||
if not ip.is_private:
|
if not ip.is_private:
|
||||||
services[f'SPAM BLOCKLIST {ip}'] = {
|
services[f'SPAM BLOCKLIST {ip}'] = {
|
||||||
'command_on_monitored_host': f'/usr/local/share/icinga/plugins/check_spam_blocklist {ip}',
|
'check_command': 'spam_blocklist',
|
||||||
'vars.sshmon_timeout': 15,
|
'vars.ip': str(ip),
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue