Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
/usr/sbin/zoneadm list -ip > /tmp/zoneinfo
msg=
cat /tmp/zoneinfo | while read info
do
zone=`echo $info | cut -d : -f 2`
state=`echo $info | cut -d : -f 3`
if [ "$state" = "running" ]; then
msg="OK: zone $zone is in running state "
else
msg="CRITICAL: Zone $zone is in $state "
$status = 2
fi
echo $msg
done
if [ "$status" = "2" ]; then
sort $msg
exit 2
fi
rm /tmp/zoneinfo
exit 0
So, when I use "/usr/bin/zoneadm list -ip" is fails, but when I change this command to e.g. "/usr/bin/ls -la /tmp" I get output from check_nrpe on the nagios server.
Also debug mode doesn't give any extra output.
When I didn't have the sufficient privileges to execute the script it would give me any output.
It gives me output with "ls -la" but not with "zoneadm"
The problem was an update of the libs on the server.
It gave an segv on zoneadm.