Skip to content

Riak

Exporter Metrics

Riak KV is a distributed NoSQL key-value store designed for high availability and fault tolerance. Detailed metrics are collected using a Prometheus exporter that reads from Riak’s built-in /stats HTTP endpoint.

Detailed Riak metrics are collected using the third-party riak_exporter.

  • Riak KV installed and running with the HTTP interface enabled (port 8098 by default)
  • Glouton agent installed on the same host
  • Python 3.6+ with pip

Install the exporter with pip:

Terminal window
pip install riak-exporter

Start the exporter:

Terminal window
riak-exporter --riak-host localhost --riak-port 8098 --port 9102

The exporter queries Riak’s /stats endpoint and listens on port 9102 by default. Verify it is working:

Terminal window
curl http://localhost:9102/metrics

For production use, create a systemd service unit to manage the exporter process.

Terminal window
sudo tee /etc/glouton/conf.d/99-riak.conf > /dev/null << 'EOF'
metric:
prometheus:
targets:
- url: "http://localhost:9102/metrics"
name: "riak"
allow_metrics:
- "riak_node_gets_total"
- "riak_node_puts_total"
- "riak_memory_total"
- "riak_connected_nodes"
- "riak_ring_members"
- "riak_vnode_gets_total"
EOF

Glouton automatically detects configuration changes.

Metric Description
riak_node_gets_total Total number of GET operations coordinated by this node
riak_node_puts_total Total number of PUT operations coordinated by this node
riak_memory_total Total amount of memory allocated by the Riak node in bytes
riak_connected_nodes Number of nodes currently connected to this node
riak_ring_members Number of members in the Riak ring
riak_vnode_gets_total Total number of GET operations handled by vnodes on this node