According to Monitoring Basics - Icinga 2 v2.10 there should be a way to set some sort of “global default” for runtime macros. If not explicitly set in either service, host or command object, it should get sourced from “5. Global custom attributes in the Vars constant”
I seem to fail to understand how that works.
my check_command:
object CheckCommand “check_snmp_oid” {
import “plugin-check-command”
command = [ PluginDir + “/check_snmp” ]arguments = {
“-H” = “$address$”
“-p” = “$port$”
“-C” = “$snmpcommunity$”
…
}
I also have a 00_constants.conf
const snmpcommunity = “public”
and 01_globals.conf
globals.vars += { snmpcommunity = “public” }
globals.Vars += { snmpcommunity = “public” }
Vars += { snmpcommunity = “public” }
Files get included properly, syntax errors in them will throw exceptions in the config parser
but debuglog still shows that the resulting command is missing the ‘-C public’ argument
Where’s my mistake?