(Debian4.0r1) mrtg & snmp

Source: Internet
Author: User
Tags snmpwalk mrtg
(Debian4.0r1) mrtg & amp; snmp-Debian information for the Linux release. For more information, see the following. Install snmpd mrtg snmp package
# Apt-get update
# Apt-get install snmpd snmp mrtg

Before modifying the configuration file, go to the/usr/share/snmp directory to view the instructions.

1. Modify/etc/default/snmpd
Set this item to SNMPDOPTS = '-Lsd-Lf/dev/null-u snmp-I-smux-p/var/run/snmpd. modify pid 127.0.0.1 to SNMPDOPTS = '-Lsd-Lf/dev/null-u snmp-I-smux-p/var/run/snmpd. pid. Otherwise, it only listens for requests on 127.0.0.1.

2. Modify/etc/hosts. allow so that snmpd can be used (or do not modify this)

3. Modify the snmpd configuration file.

# Echo>/etc/snmp/snmpd. conf
# Vim/etc/snmp/snmpd. conf:
Rocommunity weelaa

# Sec. name source community
##====================================
Com2sec local localhost weelaa
Com2sec network_1 default weelaa
Com2sec network_2 default weelaa

# Access. group. name sec. model sec. name
##========================================
Group MyROGroup_1 v1 local
Group MyROGroup_1 v1 network_1
Group MyROGroup_2 v2c network_2

# MIB. view. name incl/excl MIB. subtree mask
##===================================================
View all-mibs encoded ded. 1 80
View system Supported ded .iso.org. dod. internet. mgmt. mib-2.system


# MIB
# Group. name context sec. model sec. level prefix read write notif
##=================================================== ========================
Access MyROGroup_1 "" v1 noauth exact all-mibs none
Access MyROGroup_2 "" v2c noauth exact all-mibs none

The configuration file is very simple. You can refer to its annotations or man snmpd. conf.

#/Etc/inint. d/snmpd restart
# Snmpwalk-v 1-c weelaa localhost system or snmpwalk-v 1-c weelaa 192.168.0.100 system
Snmp configuration complete

MRTG Configuration
# Producer maker -- global "WorkDir:/var/www/mrtg" -- global "Options [_] growright, bits" -- ifref = ip \
> -- Output =/etc/mrtg. cfg \
> Weelaa@192.168.0.100
# Indexmaker -- output =/var/www/mrtg/index.html -- title = "traffic info"/etc/mrtg. cfg
# Crontab-e create a task plan

Conclusion: be familiar with the relationship between the snmp protocol workflow management site and the agent site to understand the mib database.
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.