mirror of https://github.com/Icinga/icinga2.git
parent
bb033b5ce3
commit
1f05cc23d1
|
@ -718,7 +718,6 @@ object CheckCommand "load" {
|
|||
|
||||
object CheckCommand "snmp" {
|
||||
import "plugin-check-command"
|
||||
import "ipv4-or-ipv6"
|
||||
|
||||
command = [ PluginDir + "/check_snmp" ]
|
||||
|
||||
|
@ -740,7 +739,17 @@ object CheckCommand "snmp" {
|
|||
}
|
||||
}
|
||||
|
||||
vars.snmp_address = "$check_address$"
|
||||
vars.snmp_address = {{
|
||||
var addr_v4 = macro("$address$")
|
||||
var addr_v6 = macro("$address6$")
|
||||
|
||||
if (addr_v4) {
|
||||
return addr_v4
|
||||
} else {
|
||||
return "udp6:[" + addr_v6 + "]"
|
||||
}
|
||||
}}
|
||||
|
||||
vars.snmp_community = "public"
|
||||
vars.snmp_invert_search = false
|
||||
vars.snmp_timeout = "10"
|
||||
|
|
Loading…
Reference in New Issue