Configuring Linux devices to provide data through SNMP

To configure a Linux machine for monitoring, it must have SNMP installed. A good Linux SNMP application is net-snmp. Download, install, and configure net-snmp to then use SNMP to monitor Linux devices.

To monitor Linux devices via SNMP, add them to the default /Server/Linux device class.

SNMP v2c configuration

SNMP version v2c requires only an SNMP community string. To configure Resource Manager to monitor Linux servers, set the zSnmpCommunity property to the configured community string value.

Required properties and values:

SettingzProperty NameValue
SNMP VersionzSnmpVerv2c
Community StringzSnmpCommunitypublic

A sample snmpd.conf file configured for v2c access might look like the following:

rocommunity public
"Public" is a common read-only SNMP community string. When configuring your devices for SNMP-based modeling/monitoring, you should use a unique value.

SNMP v3 configuration

SNMP version v3 configuration is more complex, but adds authentication and encryption (if configured to do so).

Required properties and values:

SettingzProperty NameValue
SNMP VersionzSnmpVerv3
Security NamezSnmpSecurityNamezenmonitor
Authentication TypezSnmpAuthType(MD5|SHA)
Authentication PasswordzSnmpAuthPasswordauthenticationpassword
Privacy TypezSnmpPrivType(AES|DES)
Privacy PasswordzSnmpPrivPasswordprivacypassword

Configuring an SNMP v3 user on Linux hosts is easily accomplished with the net-snmp-config --create-snmpv3-user command, which may require the installation of the libsnmp-dev package, depending on your OS.

systemctl stop snmpd
sudo net-snmp-config --create-snmpv3-user -ro -a SHA -A authenticationpassword -x DES -X privacypassword zenmonitor
systemctl start snmpd
The net-snmp-config --create-snmpv3-user -ro command can be run without additional flags to launch interactive mode. This may be useful if you'd like to avoid passphrases in your shell history.

To confirm communication from snmpd, you can perform an snmpwalk:

snmpwalk -v3 -u zenmonitor -l authPriv -a SHA -A authenticationpassword -x DES -X privacypassword localhost

  • SNMP v3 can be configured to use no authentication or privacy, authentication without privacy, or authentication with privacy. If zSnmpPrivType and zSnmpPrivPassword are set, zSnmpAuthType and zSnmpAuthPassword must also be set.
  • The displayed zSnmpAuthPassword and zSnmpPrivPassword listed above are for reference only; your organization should use unique values.