Skip to content

Configuring SNMP on Linux

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:

Setting zProperty Name Value
SNMP Version zSnmpVer v2c
Community String zSnmpCommunity public

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:

Setting zProperty Name Value
SNMP Version zSnmpVer v3
Security Name zSnmpSecurityName zenmonitor
Authentication Type zSnmpAuthType (MD5|SHA)
Authentication Password zSnmpAuthPassword authenticationpassword
Privacy Type zSnmpPrivType (AES|DES)
Privacy Password zSnmpPrivPassword privacypassword

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.