mirror of https://github.com/Icinga/icinga2.git
string()ify the result of macro() calls
Always convert results of macro("$nwc_health_protocol$") to strings so both numbers and strings are correctly recognized.
This commit is contained in:
parent
9d1b24a3f9
commit
3636b5b4ba
|
@ -525,27 +525,27 @@ object CheckCommand "nwc_health" {
|
|||
"--username" = {
|
||||
value = "$nwc_health_username$"
|
||||
description = "The securityName for the USM security model (SNMPv3 only)"
|
||||
set_if = {{ macro("$nwc_health_protocol$") == "3" }}
|
||||
set_if = {{ macro("$nwc_health_protocol$").string() == "3" }}
|
||||
}
|
||||
"--authpassword" = {
|
||||
value = "$nwc_health_authpassword$"
|
||||
description = "The authentication password for SNMPv3"
|
||||
set_if = {{ macro("$nwc_health_protocol$") == "3" }}
|
||||
set_if = {{ macro("$nwc_health_protocol$").string() == "3" }}
|
||||
}
|
||||
"--authprotocol" = {
|
||||
value = "$nwc_health_authprotocol$"
|
||||
description = "The authentication protocol for SNMPv3 (md5|sha)"
|
||||
set_if = {{ macro("$nwc_health_protocol$") == "3" }}
|
||||
set_if = {{ macro("$nwc_health_protocol$").string() == "3" }}
|
||||
}
|
||||
"--privpassword" = {
|
||||
value = "$nwc_health_privpassword$"
|
||||
description = "The password for authPriv security level"
|
||||
set_if = {{ macro("$nwc_health_protocol$") == "3" }}
|
||||
set_if = {{ macro("$nwc_health_protocol$").string() == "3" }}
|
||||
}
|
||||
"--privprotocol" = {
|
||||
value = "$nwc_health_privprotocol$"
|
||||
description = "The private protocol for SNMPv3 (des|aes|aes128|3des|3desde)"
|
||||
set_if = {{ macro("$nwc_health_protocol$") == "3" }}
|
||||
set_if = {{ macro("$nwc_health_protocol$").string() == "3" }}
|
||||
}
|
||||
"--contextengineid" = {
|
||||
value = "$nwc_health_contextengineid$"
|
||||
|
|
Loading…
Reference in New Issue