Simple Network Management Protocol

Riak Enterprise provides a built-in SNMP server that allows an external system, such as Hyperic, to query the Riak node for statistics such as the average get and put times as well as the number of puts and gets. This document only covers SNMP v2c support at this time.


The first step in configuring your SNMP setup is to edit the appropriate files in the Riak node’s etc/snmp/agent/conf/ directory.

First, edit the agent.conf file and set the appropriate IP on which the SNMP server should listen (Ex:

{intAgentIpAddress, [192,168,1,20]}.
{intAgentUDPPort, 4000}.
{snmpEngineID, "agent's engine"}.
{snmpEngineMaxMessageSize, 484}.

%% Note: The commas in the IP are in the correct format

Next, edit the community.conf file if you would like to change your community from public to a different string.

Finally, edit the standard.conf file and update it with the proper information:

{sysName, "Riak Node 1"}.
{sysDescr, "Riak Agent"}.
{sysContact, ""}.
{sysLocation, "System and Rack Location"}.
{sysObjectID, [3,6,1,4,1,193,19]}.  %% {ericsson otp} - don't change
{sysServices, 72}. %% don't change

Riak needs to be restarted for configuration changes to take affect.

Note: Prior to Riak Enterprise 0.13, SNMP configuration values were not reloaded during a restart.

To force Riak to reload SNMP configuration files on startup:

  1. Open app.config (most package installs place this file in /etc/riak/; Solaris package installs place this file in /opt/riak/etc/).

  2. Locate the SNMP term:

        [{config, [{dir, "/etc/riak/snmp/agent/conf/"},
                   {force_load, true}]},
         {db_dir, "/var/lib/riak/snmp/agent/db/"}]}]}
        [{config, [{dir, "/etc/riak/snmp/agent/conf/"}]},
         {db_dir, "/var/lib/riak/snmp/agent/db/"}]}]}
  3. Add {force_load, true} to the config term:

          [{config, [{dir, "/etc/riak/snmp/agent/conf/"},
           {force_load, true}]},
           {db_dir, "/var/lib/riak/snmp/agent/db/"}]}]}
  4. Save app.config

  5. Restart Riak

Once you have configured the SNMP settings you can start your Riak node and will be able to snmpwalk the node to verify that the setup is working:

$ snmpwalk -OS -c public -v2c -m all .

If you would like to query the OIDs associated with Riak you will need to reference the MIB shipped with Riak. For example, the x86_64 packages have the MIB in the following folder:


This folder can be referenced in the snmpwalk command as follows:

$ snmpwalk -OS -c public -v 2c -m ALL \
  -M +/usr/lib64/riak/lib/riak_snmp-0.2/priv/mibs \ RIAK 

SNMP Counters

Type: Counter
Number of vnode-level GETs in past minute

Type: Counter
Number of vnode-level PUTs in past minute

Type: Counter
Number of GETs in past minute

Type: Counter
Number of PUTs in past minute

Type: Gauge
Mean GET time (microseconds)

Type: Gauge
Median GET time (microseconds)

Type: Gauge
95th percentile GET time (microseconds)

Type: Gauge
99th percentile GET time (microseconds)

Type: Gauge
Maximum GET time (microseconds)

Type: Gauge
95th percentile PUT time (microseconds)

Type: Gauge
99th percentile PUT time (microseconds)

Type: Gauge
Maximum PUT time (microseconds)

Type: Gauge
Mean PUT time (microseconds)

Type: Gauge
Median PUT time (microseconds)