The plugin relies on environment variables not arguments, so in that aspect it is not compatible with the current usage of Director.
It seems that this in order to use this you will need to define the environment variables on the host you run this plugin and for the user under which the plugin will run ( usually icinga ).
If your Perl is sufficient, you can alter the script to accept the variables ( https://perlmaven.com/argv-in-perl ), and then integrate the script to Director in the usual method.
Colin, you can build a wrapper script for example using bash. You pass the needed values as argument. And the Script set the values as environment variables as the perl script needed written in the docs. After this should run.
Interesting. I get what you mean but could you maybe show me an example of what the script may look like? Would it just have export NAGIO_HOSTALIAS=$host.name$ or something like that at the top of the script followed by the execution of the perl plugin with webhook argument?
So $1 would be $host.name$ ? I guess that is where I am confused… how does the hostname for example coming from Icinga2 populate the NAGIOS_HOSTALIAS= so it has the correct hostname everytime it executes?