LLI Wiki — My Digital Knowledge Base

Linux: configure an SNMPv3 user (SHA and AES) for monitoring

Create a read-only SNMPv3 user with SHA authentication and AES encryption in snmpd.conf (net-snmp) and test it with snmpwalk.

To monitor Linux servers with a tool such as Centreon (or any SNMP monitor), SNMPv3 is preferable to v1/v2c because it authenticates and encrypts the traffic. This memo shows how to enable a read-only SNMPv3 user (SHA for authentication, AES for encryption) on a Linux server running net-snmp.

Configuring snmpd

Stop the daemon before changing the configuration: createUser lines are read at startup and then replaced by an encrypted version in net-snmp's persistent configuration.

systemctl stop snmpd

Add to /etc/snmp/snmpd.conf:

rouser snmp_ro
createUser snmp_ro SHA "<AUTH_PASSPHRASE>" AES "<PRIVACY_PASSPHRASE>"

Then restart:

systemctl start snmpd

Testing

From the monitoring host or a test machine, with the net-snmp-utils package:

snmpwalk -v3 -l authPriv -u snmp_ro -a SHA -A "<AUTH_PASSPHRASE>" -x AES -X "<PRIVACY_PASSPHRASE>" sqlserver01.example.com system

Notes

Screenshots

Network design diagram of an SAP HANA infrastructure (controlled and non-controlled zones)

Table of the SAP infrastructure subnets, VLANs and gateways

Mastodon LLIMastodon SocialFosstodon