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.