Ubuntu installation test snmpd

Source: Internet
Author: User
Ubuntu installation test snmpd-Linux Enterprise Application-Linux server application information. The following is a detailed description. The company has more than 20 servers that need monitoring and management, and login is not busy every day. We are considering using snmp for monitoring.

1. installation. Install snmpd on a ubuntu machine (this is ubuntu)

# Apt-get install snmpd snmp

2. Simple test.

# Snmpwalk-v 1-c public localhost

If there is a response, it means your snmpd is working properly.

3. Configure/etc/snmp/snmpd. conf

First, modify it. Pay attention to private11 and use it later.

# Sec. name source community
Com2sec paranoid default public
Com2sec readonly default public
Com2sec readwrite default private11

Modify the disk space (check the disk space in the disk/directory)

# Disk checks
#
# The agent can check the amount of available disk space, and make
# Sure it is abve a set limit.

# Disk PATH [MIN = DEFDISKMINIMUMSPACE]
#
# PATH: mount path to the disk in question.
# MIN: Disks with space below this value will have the Mib's errorFlag set.
# Default value = DEFDISKMINIMUMSPACE.

# Check the/partition and make sure it contains at least 100 megs.

Disk/100000

Modify it again (check the average server cpu load)

# Load average checks
#

# Load [1MAX = DEFMAXLOADAVE] [5MAX = DEFMAXLOADAVE] [15MAX = DEFMAXLOADAVE]
#
# 1MAX: If the 1 minute load average is above this limit at query
# Time, the errorFlag will be set.
# 5MAX: Similar, but for 5 min average.
# 15MAX: Similar, but for 15 min average.

# Check for loads:
Load 1 1 1

4. Test

Test the server CPU load (here, private11 is the private11 in com2sec readwrite default private11)

$ Snmpwalk-v 1-c private11 localhost. 1.3.6.1.4.1.2021.10
UCD-SNMP-MIB: laIndex.1 = INTEGER: 1
UCD-SNMP-MIB: laIndex.2 = INTEGER: 2
UCD-SNMP-MIB: laIndex.3 = INTEGER: 3
UCD-SNMP-MIB: laNames.1 = STRING: Load-1
UCD-SNMP-MIB: laNames.2 = STRING: Load-5
UCD-SNMP-MIB: laNames.3 = STRING: Load-15
UCD-SNMP-MIB: laLoad.1 = STRING: 1.74
UCD-SNMP-MIB: laLoad.2 = STRING: 1.40
UCD-SNMP-MIB: laLoad.3 = STRING: 1.36
UCD-SNMP-MIB: laConfig.1 = STRING: 1.00
UCD-SNMP-MIB: laConfig.2 = STRING: 1.00
UCD-SNMP-MIB: laConfig.3 = STRING: 1.00
UCD-SNMP-MIB: laLoadInt.1 = INTEGER: 173
UCD-SNMP-MIB: laLoadInt.2 = INTEGER: 139
UCD-SNMP-MIB: laLoadInt.3 = INTEGER: 136
UCD-SNMP-MIB: laLoadFloat.1 = Opaque: Float: 1.740000
UCD-SNMP-MIB: laLoadFloat.2 = Opaque: Float: 1.400000
UCD-SNMP-MIB: laLoadFloat.3 = Opaque: Float: 1.360000
UCD-SNMP-MIB: laErrorFlag.1 = INTEGER: error (1)
UCD-SNMP-MIB: laErrorFlag.2 = INTEGER: error (1)
UCD-SNMP-MIB: laErrorFlag.3 = INTEGER: error (1)
UCD-SNMP-MIB: laErrMessage.1 = STRING: 1 min Load Average too high (= 1.74)
UCD-SNMP-MIB: laErrMessage.2 = STRING: 5 min Load Average too high (= 1.40)
UCD-SNMP-MIB: laErrMessage.3 = STRING: 15 min Load Average too high (= 1.36)

Test the disk space of the disk/directory (the private11 here is the private11 in com2sec readwrite default private11)

$ Snmpwalk-v 1-c private11 localhost. 1.3.6.1.4.1.2021.9
UCD-SNMP-MIB: dskIndex.1 = INTEGER: 1
The UCD-SNMP-MIB: dskPath.1 = STRING :/
UCD-SNMP-MIB: dskDevice.1 = STRING:/dev/sda2
UCD-SNMP-MIB: dskMinimum.1 = INTEGER: 10000000
UCD-SNMP-MIB: dskMinPercent.1 = INTEGER:-1
UCD-SNMP-MIB: dskTotal.1 = INTEGER: 15132932
UCD-SNMP-MIB: dskAvail.1 = INTEGER: 4094796
UCD-SNMP-MIB: dskUsed.1 = INTEGER: 10269428
UCD-SNMP-MIB: dskPercent.1 = INTEGER: 71.
UCD-SNMP-MIB: dskPercentNode.1 = INTEGER: 18
UCD-SNMP-MIB: dskErrorFlag.1 = INTEGER: error (1)
UCD-SNMP-MIB: dskErrorMsg.1 = STRING:/: less than 10000000 free (= 4094796)

Write some scripts or install a graphical management center to monitor your servers in batches.

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.