Hello Icinga community,
i defined a command in icinga2 director for a self developed plugin that expects some arguments, among them a string with an url, as option -u. so , like …/check_xml.pl -u http://foo.bar/bla
So, what i did was add the commamdn, under “Command*” put like
PluginDir +check_xml.pl -u http://foo.bar/bla
But that would mean the URL is hardcoded in the command definition, which is pretty ugly imho.
I tried adding “Arguments” in the command definition, but as i understood it, these are like fixed arguments like “–secure” or “–perfdate=yes” or so.
I fail to understand how to define that thing in a way, that i make a Service template using that command and and add this service as single service to a host and then, in this single service, add the URL that is to check. This would make the command more flexible and reusable for other URls as well. I tried playing around a bit, but did not succeed. Would the command definition then look something like this “pluginDir + check_xml.pl -u $var.httpurl$” ?
If someone could point me in the right direction i would be very thankful.