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" {
|
||||
import "plugin-check-command"
|
||||
import "ipv4-or-ipv6"
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue