Custom Variables not working
Posted: Mon May 20, 2013 2:13 pm
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.
From objects.cache:
I have the below test plugin running for myhost:
output of /tmp/test.bash.txt:
From objects.cache:
Code: Select all
define host {
host_name myhost
alias myhost
...
_OS_TYPE Solaris
_POC_GROUP Unix Team
}
Code: Select all
#!/bin/bash
if [ "1" ]; then
env
echo
echo $NAGIOS_HOSTOS_TYPE
echo "DONE"
date
fi > /tmp/test.bash.txt 2>&1
exit 0
output of /tmp/test.bash.txt:
Code: Select all
TERM=linux
PATH=/sbin:/usr/sbin:/bin:/usr/bin
RUNLEVEL=3
runlevel=3
PWD=/
LANGSH_SOURCED=1
LANG=en_US.UTF-8
PREVLEVEL=N
previous=N
CONSOLETYPE=vt
SHLVL=4
UPSTART_INSTANCE=
UPSTART_EVENTS=runlevel
UPSTART_JOB=rc
_=/bin/env
DONE
Mon May 20 15:11:37 EDT 2013