Difference between revisions of "Monitoring openvz resources using nagios and snmp"
(→snmpd configuration) |
(→snmpd configuration) |
||
Line 14: | Line 14: | ||
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid' | TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid' | ||
</pre> | </pre> | ||
+ | |||
+ | Create user(my_username) and add new mib: | ||
+ | <pre> | ||
+ | /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 | ||
+ | </pre> | ||
+ | |||
+ | Testing snmp: | ||
+ | <pre> | ||
+ | snmpwalk -v 3 -u my_usrname -l authPriv -a MD5 -A my_password -x DES -X my_password 207.46.250.119 | ||
+ | </pre> | ||
+ | |||
+ | == nagios configuration == | ||
+ | = nagios plugin = |
Revision as of 07:53, 4 October 2006
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