Rollkit Metrics Guide
How to configure metrics
Rollkit can report and serve Prometheus metrics, which can be consumed by Prometheus collector(s).
This functionality is disabled by default.
To enable Prometheus metrics, set instrumentation.prometheus=true
in your Rollkit node's configuration file.
Metrics will be served under /metrics
on port 26660 by default. The listening address can be changed using the instrumentation.prometheus_listen_addr
configuration option.
List of available metrics
You can find the full list of available metrics in the Technical Specifications.
Viewing Metrics
Once your Rollkit node is running with metrics enabled, you can view the metrics by:
Accessing the metrics endpoint directly:
bashcurl http://localhost:26660/metrics
Configuring Prometheus to scrape these metrics by adding the following to your
prometheus.yml
:yamlscrape_configs: - job_name: rollkit static_configs: - targets: ['localhost:26660']
Using Grafana with Prometheus as a data source to visualize the metrics.
Example Prometheus Configuration
Here's a basic Prometheus configuration to scrape metrics from a Rollkit node:
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: rollkit
static_configs:
- targets: ['localhost:26660']
Troubleshooting
If you're not seeing metrics:
- Ensure metrics are enabled in your configuration with
instrumentation.prometheus=true
- Verify the metrics endpoint is accessible:
curl http://localhost:26660/metrics
- Check your Prometheus configuration is correctly pointing to your Rollkit node
- Examine the Rollkit node logs for any errors related to the metrics server
Advanced Configuration
For more advanced metrics configuration, you can adjust the following settings in your configuration file:
instrumentation:
prometheus: true
prometheus_listen_addr: ":26660"
max_open_connections: 3
namespace: "rollkit"
These settings allow you to:
- Enable/disable Prometheus metrics
- Change the listening address for the metrics server
- Limit the maximum number of open connections to the metrics server
- Set a custom namespace for all metrics