Monitoring openvz resources using nagios and snmp

From OpenVZ Virtuozzo Containers Wiki
Revision as of 07:54, 4 October 2006 by Wolodyj (talk | contribs)
Jump to: navigation, search

snmpd configuration

Debian Etch example:

apt-get install snmpd

edit /etc/default/snmpd : remove -u snmp and repleace 127.0.0.1 witch your ip, Full/etc/default/snmpd example:

export MIBDIRS=/usr/share/snmp/mibs
SNMPDRUN=yes
SNMPDOPTS='-Lsd -Lf /dev/null  -I -smux -p /var/run/snmpd.pid 207.46.250.119'
TRAPDRUN=no
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'

Create user(my_username) and add new mib:

/etc/init.d/snmpd stop
echo rouser my_username priv > /etc/snmp/snmpd.conf
echo "extend  .1.3.6.1.4.1.2021.51  beancounters  /bin/cat /proc/user_beancounters" >> /etc/snmp/snmpd.conf
echo  createUser my_username MD5 my_password DES >> /var/lib/snmp/snmpd.conf
/etc/init.d/snmpd start 

Testing snmp:

snmpwalk   -v 3  -u my_usrname -l authPriv   -a MD5 -A my_password -x DES -X my_password  207.46.250.119

nagios configuration

nagios plugin