Monitoring Solution with Vertica and Prometheus Using Grafana

This video provides an end-to-end monitoring solution with two Vertica open-source projects – Vertica Grafana Plugin and Vertica Prometheus Exporter. It demonstrates how you can get your Vertica metrics in Prometheus and use either Prometheus or Grafana to visualize these metrics based on what your requirement is. Check out the video for more details!

Prometheus is an open-source systems monitoring and alerting toolkit. Since its inception in 2012, many companies and organizations have adopted Prometheus, and the project has a very active developer and user community. Prometheus collects and stores its metrics as time series data, that is, metrics information is stored with the timestamp at which it was recorded, alongside optional key-value pairs called labels.

Customers asked for a way to capture Vertica metrics in Prometheus, which then gives them the option to visualize and monitor these metrics and the rest of their infrastructure in a unified dashboard environment such as Grafana.

Grafana allows you to query, visualize, alert on, and understand your metrics no matter where they are stored. Grafana takes a unique approach to providing a “single-pane-of-glass” by unifying your existing data, wherever it lives.

We developed the vertica-prometheus-exporter as a solution to this need. The exporter is an open-source project. It uses collector files to map Vertica sql query results to Prometheus format, and it has HTTP capabilities so it can act as a target for Prometheus.

This document provides an end to end solution on how to use the vertica-prometheus-exporter to scrape metrics from Vertica system tables, have Prometheus use the exporter as a target, and visualize the metrics stored in Prometheus in a Grafana dashboard.

The following diagram illustrates the high level workflow of this solution. The vertica-prometheus-exporter pulls metrics from Vertica into the Prometheus monitoring system. The configurations that you need to make in the exporter and Prometheus are explained in detail in this guide. You can configure and set up based on what is critical for you to track and visualize. In our testing, we used Grafana to visualize data as it has a proven integration with Prometheus. There could be other tools that can use Prometheus as a data source.


The assumptions in this document are that the reader is familiar with Linux, Vertica, Prometheus, and Grafana.

This document does not cover installation of Vertica, Prometheus, or Grafana. It shows the installed exporter’s directory structure and key files to be aware of. It also covers configuration and running of each piece of the stack to get the Vertica metrics visualized in Prometheus and Grafana.

More in depth details on the exporter can be found at the vertica-prometheus-exporter Github page in the file and files in the documentation folder.

Our Test Environment

  • Vertica 12.0.1 installed on a 3 node Linux VM cluster with the VMart example database.

  • vertica-prometheus-exporter 1.0.2 tarball installed on a Linux VM.

  • Prometheus 2.25.0 installed on a Linux VM.

  • Grafana 9.0.2 installed on a Linux VM with the Prometheus data source 5.0.0 plugin.

This solution guide is categorized based on three main sections:

You can expand and collapse topics for more details as you go along reading the guide.

Using the Vertica Prometheus Exporter

The vertica-prometheus-exporter is a configuration-driven exporter that exposes metrics gathered from a Vertica database for use by the Prometheus monitoring system, and tools that support Prometheus as a data source, such as Grafana. The exporter is written in the GO programming language and uses the Vertica-sql-go driver to connect to the Vertica database.

The core concept of this exporter is based on the idea that a proper Vertica query can easily be mapped onto a set of labels and one or more numeric values that make up a valid Prometheus metric.

Setting Up Prometheus and Visualizing Vertica Metrics

This section explains how you can set your targets and configure Prometheus to scrape metrics and then visualize it using tables and graphs that Prometheus offers.

Using Grafana and Prometheus Data Source Plugin to Visualize Vertica Metrics

This section explains how you can install the Grafana Prometheus data source plugin, configure the data source, and visualize and build dashboards for Vertica metrics in Grafana.

Summarizing the Solution

In this solution document, we demonstrated the basic tech stack the exporter would live in. We explain basic steps building the stack from the exporter all the way to showing the Vertica metrics visualized in Grafana. This solution enables users to retrieve Vertica data into the widely-used Prometheus format that can then be used to visualize metrics in a communal dashboard. At each step along that path we showed what was possible for visualization.

Your tech stack might simply be the exporter and issuing CURL commands in a cron job. It might end at Prometheus using simple tables and graphs or it might be the complete stack using Grafana or a similar tool to build more complex dashboards. It is flexible enough to configure to meet your needs. As you saw, you might need to use a combination of tools to get the desired metrics.


vertica-prometheus-exporter (GitHub)

Prometheus - Monitoring system & Time Series Database

Grafana: The Open Observability platform | Grafana Labs

Prometheus | Grafana documentation