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
- KDE remove autostart programs
- GPS on Linux
- Debian Squeeze change root password
- Download YouTube Videos on Linux
- Pidgin + The certificate for omega.contacts.msn.com could not be validated
- Tata Phonone / Reliance Netconnect (wvdial)
- mp3 on fedora-13
- Linux disk cache
- redhat/centos build kernel rpm
- KVM on centos5
- File Password Protection
- Building modules for rhel5 kernel
-
Links
-
Archives
- November 2011 (1)
- July 2011 (1)
- April 2011 (1)
- January 2011 (1)
- November 2010 (1)
- September 2010 (2)
- July 2010 (3)
- March 2010 (1)
- January 2010 (5)
- December 2009 (1)
- April 2009 (1)
- January 2009 (1)
-
Categories
-
RSS
Entries RSS
Comments RSS