Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Talk:Monitoring openvz resources using nagios and snmp

926 bytes added, 07:01, 7 April 2009
m
check_ubc Without SNMP: forgot the signature, sorry
: Remove the relevant snmp entries, and use the script with nagios-nrpe or with the nagios ssh plugin ... {{unsigned|Curx|21:50, 27 September 2007}}
 
== [[Monitoring_openvz_resources_using_nagios_and_snmp#check_ubc_Without_SNMP|check_ubc Without SNMP]] ==
 
Hi, after searching a long time for the error I would suggest to change this script.
A help would be a result "critical" if the file /proc/user_beancounters" is not readable (or empty) with a hint to sudo. In my case Nagios was always saying the all was ok, and it wasn't... (Without any hint or problem that check_ubc simple wasn't able to read the file)
This could simply be done be changing the following line:
DATA=`cat /proc/user_beancounters`
by:
<source lang="bash">
ubc_file='/proc/user_beancounters';
DATA='';
if [ -r $ubc_file ]; then
DATA=`cat $ubc_file`
fi
if [ -z "$DATA" ]; then
echo "CRITICAL - $ubc_file is not readable or empty. Maybe it is only readable for root and this script should be called by sudo.";
exit 3;
fi
</source>
--[[User:Kako|Kako]] 07:01, 7 April 2009 (UTC)
15
edits