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: 2023-05-17

Run the following commands in the terminal:

  1. Update package list: sudo apt update
  2. 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 which contains information for additional configuration options not covered here.

  1. Edit snmpd.conf with text editor of your choice, for example nano: sudo nano /etc/snmp/snmpd.conf
  2. 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:
  3. Configure rocommunity: Look for the line containing rocommunity and replace for rocommunity public and rocommunity6 public
    - [Optional] Change "public" to your community name
  4. Authorize all required SNMP OIDs to ensure that OIDs starting with both and are allowed (see below) using the view systemonly included statement
  5. Restart the SNMPD service: sudo service snmpd restart

Example Config:

agentAddress udp:161,udp6:[::1]:161
view systemonly included .
view systemonly included .
rocommunity NixKB
rocommunity6 NixKB