MRTG HowTo
$ yum install net-snmp-utils net-snmp net-snmp-libs
SNMP
======
$ vi /etc/snmp/snmpd.conf
———————————————————————–
com2sec local localhost public
com2sec mynetwork <ip>/class public
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
view all included .1 80
access MyROGroup “” any noauth exact all none none
access MyRWGroup “” any noauth exact all all none
syslocation Linux (Hostname), hostname.
syscontact name <emailid>
———————————————————————–
$ service snmpd start
$ chkconfig –add snmpd
Test via
$ snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex
———————————————————————–
IP-MIB::ipAdEntIfIndex.10.0.0.2 = INTEGER: 3
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
IP-MIB::ipAdEntIfIndex.203.201.253.231 = INTEGER: 2
IP-MIB::ipAdEntIfIndex.203.201.253.233 = INTEGER: 2
———————————————————————–
MRTG
======
$ yum install mrtg
$ mkdir -p /var/www/mrtg
create mrtg configuration file:
$ cfgmaker –global ‘WorkDir: /var/www/mrtg’ –output /etc/mrtg/mymrtg.cfg public@localhost
Create default index page for your MRTG configuration:
$ indexmaker –output=/var/www/mrtg/index.html /etc/mrtg/mymrtg.cfg
Run mrtg command from command line with your configuration file:
Run this 3 times ignoring errors
$ env LANG=C /usr/bin/mrtg /etc/mrtg/mymrtg.cfg
Add to crontab
*/5 * * * * env LANG=C /usr/bin/mrtg /etc/mrtg/mymrtg.cfg
HTTP
======
/etc/httpd/conf.d/mrtg.conf
Allow from 127.0.0.1 <your ip>
/etc/init.d/httpd restart
-
Recent
- Linux disk cache
- redhat/centos build kernel rpm
- KVM on centos5
- File Password Protection
- Building modules for rhel5 kernel
- Open SSL help
- Extracting certificates from java keystore to use in apache.conf
- What is bonding?
- Xen rescue paravirtualization
- flash player on firefox 64 bite
- Samba4 HOWTO + Fedora
- MRTG HowTo
-
Links
-
Archives
- July 2010 (3)
- March 2010 (1)
- January 2010 (5)
- December 2009 (1)
- April 2009 (1)
- January 2009 (1)
- November 2008 (12)
-
Categories
-
RSS
Entries RSS
Comments RSS