How to configure the SNMP protocol of AIX

1, Configuring the SNMP Agent in the AIX

1×1 Check the current running SNMP version


You can see that the current snmpd is using snmpdv3ne, which means that it supports the non-encrypted version of SNMPv3, ne=no encryption, as long as /etc/snmpdv3.conf is configured, it can be used in the way of SNMPv1, so the default version can meet the requirements, if there are special needs, you can also change the version with snmpv3_ssw command.

Switch to SNMPv1

Switching to SNMPv3 non-encrypted version

Switch to the encrypted version of SNMPv3 (this version is not installed by default)

1×2 Create a community called hmsnmp

Modify the /etc/snmpdv3.conf file as shown below, taking special care to mark the sections with red lines.

Where is the IP address of the monitoring tool, indicating that only this IP is allowed to access SNMP of AIX, for security reasons.

1×3 Stop and start the service to make changes to /etc/snmpdv3.conf effective

It is important to note that when the operating system reboots, the default boot parameters are public community, so in order to make the hmsnmp community work properly after the reboot, it is recommended to modify the /etc/rc.tcpip file to modify the default boot parameters as follows.

Start up the hostmibd daemon

Start up the snmpmibd daemon

Start up the aixmibd daemon

1×4 testing for normal SNMP service

Execute the following commands locally:

On other machines where SNMPWALK is installed the following commands can be executed for verification.

2, MIB OID commonly used in AIX
Above, we configured the value of SNMP Community: hmsnmp, which can be used to monitor SNMP-related services of the tool.
If you need to find the OID of an object, you can go to /etc/mib.defs to find the corresponding object, and then snmpinfo -md ObjectName to get the corresponding OID for remote call.

2×1 Display CPU usage

Remove the -v parameter and you see the OID value.

2×2 Show Paging Space

2×3 View the serial number of the machine

2×4 View CPU count

2×5 View VG-related information: aixVolumeGroup

2×6 View LV-related information: aixLogicalVolume

2×7 View PV-related information: aixPhysicalVolume

2×8 View FS-related information: aixFileSystem

3, A simple case of system monitoring via SNMP

If you are just doing a simple monitoring, then you can write your own shell script.

Let’s write a shell script,, which is deployed on the monitor, using the usage of the monitor file system as an example.

In order to see the actual output, we set the threshold to a low value in the script, if you are interested, you can also bring the threshold as a parameter in the script.

The monitor smoothly gets the information of the monitored device through SNMP and sends the relevant alarm information according to our request.

4, Summary

This article introduces the method of monitoring AIX system using SNMP protocol. Although there is still a long way to realize the monitoring of various indicators, flexibility and ease of use should be improved, but it provides a way of thinking to realize the monitoring of the operating system in an agentless way, I hope to bring some help to those who need it.

5, Additional

Alternatively, there is another way to use the conf file I provided directly, which of course requires you to modify the community and IP address.

5×1 Stop service.

5×2 Modify the conf file, replace the original conf file, and remember to back it up before replacing it.

5×3 Start service.

snmpd.conf content:

作者: Centro Sun


《How to configure the SNMP protocol of AIX》有一个想法