I can't get custom variables working with a new nagios XI install. I put a test plugin out to make sure it wasn't my plugin. I defined my custom variables in my host template. This works for our nagios core installation, but not nagios xi. Any help would be appreciated.
I certainly could be incorrect, please do link me to documentation if I am, but I don't believe that is possible. By default Nagios should not export all variables to the env variable for OS use, they are instead used internally with the program and passed to the scripts via defined commands or handlers. These variables are then expanded before exec-ing the full command. You could certainly define your check to send the $_OS_TYPES$ variable and have your script accept and use that.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.