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.
Exporter Metrics
Section titled “Exporter Metrics”Detailed Riak metrics are collected using the third-party riak_exporter.
Prerequisites
Section titled “Prerequisites”- 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
Installing the Exporter
Section titled “Installing the Exporter”Install the exporter with pip:
pip install riak-exporterStart the exporter:
riak-exporter --riak-host localhost --riak-port 8098 --port 9102The exporter queries Riak’s /stats endpoint and listens on port 9102 by default. Verify it is working:
curl http://localhost:9102/metricsFor production use, create a systemd service unit to manage the exporter process.
Glouton Configuration
Section titled “Glouton Configuration”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"EOFCreate or edit C:\ProgramData\glouton\conf.d\99-riak.conf:
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"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 |