How do I enable SNMP on an Ubuntu Linux host so that I can monitor system metrics (CPU, memory, diskspace) with EventSentry?
Article ID: 281
Category: Heartbeat Monitoring
Applies to: 3.0.1 and later
Updated: 2024-08-30
Run the following commands in the terminal:
Update package list: sudo apt update
Install SNMP: sudo apt install snmpd
Next, the configuration file for the SNMP daemon snmpd.conf needs to be adjusted. A manual page is located here (link to https://net-snmp.sourceforge.net/docs/man/snmpd.conf.html) which contains information for additional configuration options not covered here.
Edit snmpd.conf with text editor of your choice, for example nano: sudo nano /etc/snmp/snmpd.conf
Look for the agentAddress line and replace it with agentAddress: agentAddress udp:161,udp6:[::1]:161
-This will set the server to listen on all IPv4 and IPv6 addresses
-For higher security bind to your IP address. Ex: agentAddress udp:192.168.1.5:161
Configure rocommunity: Look for the line containing rocommunity and replace for rocommunity public and rocommunity6 public
- [Optional] Change "public" to your community name
Authorize all required SNMP OIDs to ensure that OIDs starting with both 1.3.6.1.2.1 and 1.3.6.1.4.1 are allowed (see below) using the view systemonly included statement
Restart the SNMPD service: sudo service snmpd restart