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
Sorry, the comment form is closed at this time.
-
Recent
- Set Time Zone + Fedora 18
- Fedora 17 + Tata Photon (Huawei)
- Fedora 17: Install OpenSSH Server
- Change the default keyring password
- Error: Could not stat() command file ‘/usr/local/nagios/var/rw/nagios.cmd’!
- Gnone 3.X adding personal launcher
- Gnome 3.x Change Panel
- 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
-
Links
-
Archives
- April 2013 (1)
- September 2012 (2)
- August 2012 (2)
- July 2012 (2)
- November 2011 (1)
- July 2011 (1)
- April 2011 (1)
- January 2011 (1)
- November 2010 (1)
- September 2010 (2)
- July 2010 (3)
- March 2010 (1)
-
Categories
-
RSS
Entries RSS
Comments RSS