CENTOS6 System SNMP Monitoring installation configuration and Usage example

Source: Internet
Author: User
Tags md5 snmp snmpwalk snmpv3

Simple Network Management Protocol (SNMP), consisting of a set of standards for network management, comprising an application-layer protocol (Application layer protocol), a database model (DB Schema), and a set of resource objects. The following and 111CN Small series look at the CENTOS6 system SNMP monitoring installation configuration and use.

  Install NET-SNMP

CentOS and other Redhat series products provide a NET-SNMP binary package. We can install it directly from the source.

Example

Yum Install Net-snmp net-snmp-devel net-snmp-utils

Description: Net-snmp-devel is to use Net-snmp-config, Net-snmp-utils is to use Snmpwalk.

  Configure NET-SNMP

Example

Create-snmpv3-user-ro-a Snmp@jiankongbao-a MD5 Jiankongbao

Above command, create a Snmpv3 user, read only, use MD5, username is Jiankongbao, password is Snmp@jiankongbao.

Note: Please deactivate the NET-SNMP service before running.

Example

Service SNMPD Stop

Run NET-SNMP

The method of running NET-SNMP service is relatively simple, but the name of NET-SNMP service is snmpd.

Example

Service SNMPD Start

If you want to join the boot Autorun Service list:

Example

Chkconfig snmpd on

Detect NET-SNMP

We can use Snmpwalk to detect if the SNMP service is turned on properly.

Example

Snmpwalk-v 3-u jiankongbao-a md5-a "Snmp@jiankongbao"-l authnopriv 127.0.0.1 SYSDESCR

If everything works, it will return to normal results.

  With a firewall, you have to open the UDP 161 port.

[Root@zhudoubaby ~]# Iptables-l

Chain INPUT (Policy ACCEPT)

Target Prot opt source destination

Rh-firewall-1-input All-anywhere anywhere

Chain FORWARD (Policy ACCEPT)

Target Prot opt source destination

Rh-firewall-1-input All-anywhere anywhere

Chain OUTPUT (Policy ACCEPT)

Target Prot opt source destination

Chain Rh-firewall-1-input (2 references)

Target Prot opt source destination

ACCEPT UDP--anywhere anywhere state NEW UDP DPT:SNMP (required)

ACCEPT TCP--Anywhere anywhere state NEW TCP DPT:SMTP (NO)

  

  Using procedure error logging

Note: Sometimes entering service SNMPD status appears

SNMPD dead but PID file exists

Or

SNMPD dead but Subsys locked

The reason is not to enter SNMPD first, the principle is not very clear, but first remember.

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.