move SPAM BLOCKLIST check to icinga2 itself
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:
Franzi 2021-11-28 07:26:41 +01:00
parent 70cb460934
commit d44c87e8a7
Signed by: kunsi
GPG key ID: 12E3D2136B818350
5 changed files with 12 additions and 5 deletions

View file

@ -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" {
import "plugin-check-command"
import "ipv4-or-ipv6"

View file

@ -86,6 +86,9 @@ files = {
'/usr/local/share/icinga/plugins/check_freifunk_node': {
'mode': '0755',
},
'/usr/local/share/icinga/plugins/check_spam_blocklist': {
'mode': '0755',
},
'/usr/local/share/icinga/plugins/check_usv_snmp': {
'mode': '0755',
},

View file

@ -62,9 +62,6 @@ files = {
'/usr/local/share/icinga/plugins/check_postfix_queue': {
'mode': '0755',
},
'/usr/local/share/icinga/plugins/check_spam_blocklist': {
'mode': '0755',
},
}
actions = {

View file

@ -137,8 +137,8 @@ def icinga2(metadata):
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': 15,
'check_command': 'spam_blocklist',
'vars.ip': str(ip),
}
return {