CentOS Install MRTG

Source: Internet
Author: User
Tags mrtg

  1. Installing Support Packages
    Yum–y install gcc perl gd libpng zlib net-snmp MRTG
    Configure SNMPD
    Edit/etc/snmp/snmpd.conf File
    Back up the snmpd.conf file and create a new blank snmpd.conf. Add the following to save
    Com2sec notconfiguser localhost public
    Group Notconfiggroup v1 Notconfiguser
    Group Notconfiggroup v2c Notconfiguser
    View SystemView included. 1.3.6.1.2.1.1
    View SystemView included. 1.3.6.1.2.1.25.1.1
    Access Notconfiggroup "" Any noauth exact none none
    View all included. 1 80
    Syslocation Unknown (edit/etc/snmp/snmpd.conf)
    Syscontact Root
  2. Restart SNMPD After the modification is complete
    Service SNMPD Restart
    Chkconfig snmpd on
  3. Configure MRTG
    The default MRTG configuration file is saved in the/etc/mrtg/mrtg.cfg
    We recommend that you use commands to generate mrtg.cfg templates.
    Cfgmaker [email protected]--output/etc/mrtg.cfg
  4. Modify the/etc/mrtg.cfg file
    Just change the Workdir: to access the path
    such as: Workdir:/VAR/WWW/MRTG
    Mkdir/var/www/mrtg
  5. Build MRTG Home
    Indexmaker/etc/mrtg/cfg >/var/www/mrtg/index.html
    Empowering: chmod 777/usr/bin/rateup
  6. plot a data diagram using MRTG
    Env LANG=C/USR/BIN/MRTG/ETC/MRTG.CFG
  7. Create a timed task
    */5 * * * * env LANG=C/USR/BIN/MRTG/ETC/MRTG.CFG
  8. Modify/etc/httpd/conf.d/mrtg.conf (only native access is run by default)

    Alias/mrtg/var/www/mrtg

    <Location/mrtg>
    Order Deny,allow
    Deny from None
    Allow from all
    Allow from:: 1
    # Allow from. example.com
    </Location>

    Restart Apache Access http://your-ip/mrtg/

Reference: http://my.oschina.net/jack230230/blog/150470 (including CPU, memory monitoring)

CentOS Install MRTG

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.