Skip to content

Prometheus and Grafana Monitoring on Kubernetes with Helm

Quine Enterprise can be monitored with Prometheus and Grafana. The container image Quine Enterprise ships with can be configured to enable the Prometheus JMX exporter within to emit metrics to be scraped by a Prometheus instance. Grafana can then use Prometheus as a datasource and visualize the provided metrics. This guide will show you how to set this up in a Kubernetes cluster using Helm.

Prerequisites

Installing Quine Enterprise with Prometheus and Grafana, using Helm

We will be using Helm charts for Quine Enterprise, Prometheus, and Grafana to stand up a 3 member Quine Enterprise cluster, with Prometheus scraping metrics emitted from each cluster member, and Grafana using Prometheus as a datasource to visualize metrics using the Quine Enterprise Grafana Dashboard.

Provided below will be 4 assets to help you install these resources:

  • Quine Enterprise Helm values
  • Prometheus Helm values
  • Grafana Helm values
  • Bash script to install all 3 services

Quine Enterprise Helm Values (quine-enterprise-values.yaml)

These Helm values will:

  • Create a 3 member Quine Enterprise cluster
  • Use the Quine Enterprise trial version with the supplied <EMAIL> and <API_KEY>
  • Use the empty persister
  • Enable the Prometheus JMX Exporter within the container image to emit metrics to be scraped by Prometheus
  • Annotate the Quine Enterprise pods with annotations the Prometheus deployment expects for successful Kubernetes service discovery
hostCount: 3
trial:
  email: <EMAIL>
  apiKey: <API_KEY>
cassandra:
  enabled: false
metrics:
  prometheus:
    enabled: true

Prometheus Helm Values (prometheus-values.yaml)

The Prometheus Helm values has defaults which will automatically perform kubernetes service discovery. The Quine Enterprise Helm chart above, by setting metrics.prometheus.enabled to true, will add the annotations the Prometheus deployment will expect.

server:
  global:
    scrape_interval: 15s
    scrape_timeout: 10s
configmapReload:
  prometheus:
    enabled: false
alertmanager:
  enabled: false
kube-state-metrics:
  enabled: false
prometheus-node-exporter:
  enabled: false
prometheus-pushgateway:
  enabled: false

Grafana Helm Values (grafana-values.yaml)

The Grafana Helm values below configures the above Prometheus deployment as a datasource, so it is made available right away.

adminUser: admin
adminPassword: admin
datasources:
  datasources.yaml:
    apiVersion: 1
    datasources:
    - name: Prometheus
      type: prometheus
      access: proxy
      url: http://prometheus-server
      isDefault: true

Bash script to install everything (install-cluster.sh)

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add thatdot https://helm.thatdot.com
helm repo update

helm \
  upgrade --install prometheus \
  prometheus-community/prometheus \
  -f prometheus-values.yaml

helm \
  upgrade --install grafana \
  grafana/grafana \
  -f grafana-values.yaml

helm \
  upgrade --install quine-enterprise \
  thatdot/quine-enterprise \
  -f quine-enterprise-values.yaml

Info

Requires thatdot/quine-enterprise Helm chart version 0.4.7 or later.

After running this script, port-forward and navigate to the Grafana pod, login using admin/admin, and then import the Quine Enterprise Dashboard.

Quine Enterprise Grafana Dashboard

Grafana Dashboard

The Quine Enterprise Grafana Dashboard has the following controls:

  • Ingest Rate per stream
  • Bucketed Node Edge Counts
  • Persistor Latency
  • Cluster Nodes Awake
  • Heap Memory Usage