!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[root@caretel ~]# yum install mrtg net-snmp-utils net-snmp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: ftp.cuhk.edu.hk
* base: centos.aol.in
* updates: centos.aol.in
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package net-snmp.i386 1:5.3.2.2-14.el5_7.1 set to be updated
--> Processing Dependency: net-snmp-libs = 1:5.3.2.2-14.el5_7.1 for package: net-snmp
--> Processing Dependency: libsensors.so.3 for package: net-snmp
---> Package net-snmp-utils.i386 1:5.3.2.2-14.el5_7.1 set to be updated
---> Package mrtg.i386 0:2.14.5-2 set to be updated
--> Processing Dependency: perl-IO-Socket-INET6 for package: mrtg
--> Processing Dependency: perl-Socket6 for package: mrtg
--> Running transaction check
---> Package lm_sensors.i386 0:2.10.7-9.el5 set to be updated
---> Package perl-Socket6.i386 0:0.19-3.fc6 set to be updated
---> Package perl-IO-Socket-INET6.noarch 0:2.51-2.fc6 set to be updated
---> Package net-snmp-libs.i386 1:5.3.2.2-14.el5_7.1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Installing:
mrtg i386 2.14.5-2 CentOS 841 k
net-snmp i386 1:5.3.2.2-14.el5_7.1 updates 702 k
net-snmp-utils i386 1:5.3.2.2-14.el5_7.1 updates 190 k
Updating:
net-snmp-libs i386 1:5.3.2.2-14.el5_7.1 updates 1.3 M
Installing for dependencies:
lm_sensors i386 2.10.7-9.el5 base 511 k
perl-IO-Socket-INET6 noarch 2.51-2.fc6 base 13 k
perl-Socket6 i386 0.19-3.fc6 base 22 k
Transaction Summary
=============================================================================================================================
Install 6 Package(s)
Update 1 Package(s)
Remove 0 Package(s)
Total download size: 3.5 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): perl-IO-Socket-INET6-2.51-2.fc6.noarch.rpm | 13 kB 00:00
(2/7): perl-Socket6-0.19-3.fc6.i386.rpm | 22 kB 00:00
(3/7): net-snmp-utils-5.3.2.2-14.el5_7.1.i386.rpm | 190 kB 00:00
(4/7): lm_sensors-2.10.7-9.el5.i386.rpm | 511 kB 00:07
(5/7): net-snmp-5.3.2.2-14.el5_7.1.i386.rpm | 702 kB 00:03
(7/7): net-snmp-libs-5.3.2.2-14.el5_7.1.i386.rpm | 1.3 MB 00:06
-----------------------------------------------------------------------------------------------------------------------------
Total 163 kB/s | 3.5 MB 00:21
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : net-snmp-libs [1/8]
Installing : perl-Socket6 [2/8]
Installing : lm_sensors [3/8]
Installing : net-snmp [4/8]
Installing : net-snmp-utils [5/8]
Installing : perl-IO-Socket-INET6 [6/8]
Installing : mrtg [7/8]
Cleanup : net-snmp-libs [8/8]
Installed: mrtg.i386 0:2.14.5-2 net-snmp.i386 1:5.3.2.2-14.el5_7.1 net-snmp-utils.i386 1:5.3.2.2-14.el5_7.1
Dependency Installed: lm_sensors.i386 0:2.10.7-9.el5 perl-IO-Socket-INET6.noarch 0:2.51-2.fc6 perl-Socket6.i386 0:0.19-3.fc6
Updated: net-snmp-libs.i386 1:5.3.2.2-14.el5_7.1
Complete!
# First take BackUp of origional file.
#cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.origional
#vi /etc/snmp/snmpd.conf
# Change this Line:-
com2sec notConfigUser default public
# New Line
com2sec local localhost public
com2sec mynetwork 11.0.0.2/8 public
# Change this Line:-
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
# New Line
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
# Change this Line:-
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
# New Line
view all included .1 80
# Change this Line:-
access notConfigGroup "" any noauth exact systemview none none
# New Line
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
# Change this Line:-
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root (configure /etc/snmp/snmp.local.conf)
# New Line
syslocation Linux, CentOS, Fedora Core 6
syscontact Root root@localhost
#/etc/init.d/snmpd start
#chkconfig snmpd on
[root@caretel ~]# snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex
IP-MIB::ipAdEntIfIndex.11.0.0.2 = INTEGER: 3
IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
IP-MIB::ipAdEntIfIndex.172.16.10.3 = INTEGER: 2
# mkdir /var/www/html/mrtg/
# cfgmaker --global "workdir: /var/wwwhtml/mrtg" -ifref=ip --output /etc/mrtg/mrtg.cfg --global 'options[_]: growright,bits' public@localhost
# indexmaker --output=/var/www/html/mrtg/index.html /etc/mrtg/mrtg.cfg
# vi /etc/httpd/conf.d/mrtg.conf
Change HtmlDir:- /var/www/html
:wq
[root@caretel ~]# mrtg /etc/mrtg/mrtg.cfg
-----------------------------------------------------------------------
ERROR: Mrtg will most likely not work properly when the environment
variable LANG is set to UTF-8. Please run mrtg in an environment
where this is not the case. Try the following command to start:
env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
-----------------------------------------------------------------------
[root@caretel ~]# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
08-12-2011 13:04:23, Rateup WARNING: /usr/bin/rateup could not read the primary log file for localhost_172.16.10.3
08-12-2011 13:04:23, Rateup WARNING: /usr/bin/rateup The backup log file for localhost_172.16.10.3 was invalid as well
08-12-2011 13:04:23, Rateup WARNING: /usr/bin/rateup Can't remove localhost_172.16.10.3.old updating log file
08-12-2011 13:04:23, Rateup WARNING: /usr/bin/rateup Can't rename localhost_172.16.10.3.log to localhost_172.16.10.3.old updating log file
08-12-2011 13:04:23, Rateup WARNING: /usr/bin/rateup could not read the primary log file for localhost_11.0.0.2
08-12-2011 13:04:23, Rateup WARNING: /usr/bin/rateup The backup log file for localhost_11.0.0.2 was invalid as well
08-12-2011 13:04:23, Rateup WARNING: /usr/bin/rateup Can't remove localhost_11.0.0.2.old updating log file
08-12-2011 13:04:23, Rateup WARNING: /usr/bin/rateup Can't rename localhost_11.0.0.2.log to localhost_11.0.0.2.old updating log file
# http://127.0.0.1/mrtg
# http://172.16.10.3/mrtg
# http://11.0.0.2/mrtg