Hello,
I want to use the xmppng plugin from Icinga exchange. I have manually used the plugin from the command line. For instance:
./check_xmppng -H xmpp.foo.bar --servername foo.bar
XMPP OK - request took 0.523989s, certificate valid for 70 days | daysvalid=70 time=0.523989s;;;0
That works great and that is what I need in Icinga. What I am not sure is how to call this script from Icinga. Specially how to pass the variables as I do with other check commands.
I have try this. Under /usr/local/etc/icinga2/zones.d/global-templates/commands/xmppng.conf
I have:
object CheckCommand "xmppng" {
import "plugin-check-command"
command = "/usr/local/lib/nagios/plugins/check_xmppng"
}
Under /usr/local/etc/icinga2/conf.d/services/xmppng.conf
I have:
apply Service "XMPP server " {
import "generic-service"
check_command = "xmppng"
command_endpoint = "master.foo.bar"
vars.xmppng_host_address = host.name
vars.xmppng_servername = "foo.bar"
assign where match("xmpp.foo.bar", host.name)
}
The script is called, but the variables are not send as arguments. I know I am missing something, How do I know the name of the variables that are use by the command? Am I missing a step?
Thanks a lot.
PS I ask the question for xmppng, but I had the same issue trying other plugins. It would be nice to have something like a quick guide in exchange.icinga.com on how to add plugins.