mrtg 설치 Linux

yum 으로 httpd, php, mrtg 설치함

yum -y install net-snmp* freetype gd libjpeg libpng mrtg* php httpd

vi /etc/snmp/snmpd.conf
--------------------------------------------------------------------------------
# First, map the community name "public" into a "security name"

#       sec.name  source          community
com2sec local  192.168.116.143       public

####
# Second, map the security name into a group name:

#       groupName      securityModel securityName
group   notConfigGroup v1           local
group   notConfigGroup v2c           local

####
# Third, create a view for us to let the group have rights to:

# Make at least  snmpwalk -v 1 localhost -c public system fast again.
#       name           incl/excl     subtree         mask(optional)
view    systemview    included   .1     80
view    mib2          included   .iso.org.dod.internet.mgmt.mib-2 fc
####
# Finally, grant the group read-only access to the systemview view.

#       group          context sec.model sec.level prefix read   write  notif
access  notConfigGroup ""      any       noauth    exact  systemview none none
--------------------------------------------------------------------------------
/etc/init.d/snmpd restart

cfgmaker --global 'WorkDir: /var/www/mrtg' --global 'Options[_]: bits, growright' --output /var/www/mrtg/mrtg.cfg public@192.168.116.143

indexmaker --title "MRTG" --output /var/www/mrtg/index.html /var/www/mrtg/mrtg.cfg

env LANG=C /usr/bin/mrtg /var/www/mrtg/mrtg.cfg

crontab -e
--------------------------------------------------------------------------------
*/1 * * * * /usr/bin/mrtg /var/www/mrtg/mrtg.cfg --logging /var/log/mrtg.log
--------------------------------------------------------------------------------

Leave Comments