5.3. Integrating VoltDB with Prometheus


VoltDB Home » Documentation » Administrator's Guide

5.3. Integrating VoltDB with Prometheus

If you use Prometheus to monitor your systems and services, you can enable the collection and reporting of Prometheus-compliant metrics on the database cluster. You enable Prometheus metrics in the configuration file when initializing the database by adding the <metrics> element to the Volt configuration file:

   <cluster kfactor="1"/>
   <metrics enabled="true"/>

Next, add the Volt cluster nodes as targets in the Prometheus configuration. Since each node reports its own data, be sure to include all of the nodes as scraping targets. For example:

  scrape_interval:     15s
  evaluation_interval: 15s

  - job_name: volt
      - targets: ['voltsvr1:11781','voltsvr2:11781','voltsvr3:11781']

Once metrics are enabled, each Volt server reports server-specific information through the Prometheus endpoint (/metrics) on the metrics port, which defaults to 11781. You can specify an alternate port and/or network interface using the --metrics qualifier on the voltdb start command.

The Prometheus data format is a readily accessible text format and can be used equally well by other reporting applications. Applications can either send HTTP requests to the metrics endpoint like Prometheus or use the @Metrics system procedure, which returns the same data formatted in a sequence of VoltTable structures. Appendix B, Volt Active Data Metrics lists the metrics values reported VoltDB.

Once Prometheus is scraping the Volt metrics, you can use tools such as Grafana to combine, analyze, and present the information in meaningful ways. There are example Grafana dashboards in the Volt Github repository (https://github.com/VoltDB/volt-monitoring) demonstrating some of the visualizations that are possible.