If you don't want to install pkgin in the global zone, but you want to use Nagios send_nsca command, this is how I did it.
Inside a zone install the nagios-nsca package.
pkgin in nagios-nsca-2.9.1nb2
From the global zone, cd to the zone zfs and copy these files in a place of your own.
cd /zones/<uuid>
cp opt/local/gcc47/x86_64-sun-solaris2.11/lib/amd64/libgcc_s.so.1 /opt/custom/nsca/
cp opt/local/gcc47/x86_64-sun-solaris2.11/lib/amd64/libgcc_s.so.1 /opt/custom/nsca/
cp opt/local/lib/libmcrypt.so.4 /opt/custom/nsca/
Create a configuration file
vi /opt/custom/nsca/send_nsca.cfg
Now set the LD_LIBRARY_PATH variable and run the command
export LD_LIBRARY_PATH=/opt/custom/nsca; echo "host;passive_check;0;All seems to be OK" | /opt/custom/nsca/send_nsca -H nagios.ip -p 5667 -d ";" -c /opt/custom/nsca/send_nsca.cfg
No comments:
Post a Comment