Skip to content

Files

Latest commit

fdc7b22 · Dec 20, 2019

History

History
This branch is 2 commits ahead of, 15889 commits behind vitessio/vitess:main.

vitess-mixin

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 20, 2019
Dec 20, 2019
Dec 20, 2019
Dec 20, 2019
Dec 20, 2019
Dec 20, 2019
Dec 20, 2019
Dec 20, 2019
Dec 20, 2019
Dec 20, 2019

(Alpha) Prometheus Monitoring Mixin for Vitess

A set of Grafana dashboards and Prometheus alerts for Vitess.

Prerequisites

  1. Install jsonnet-bundler:

    • via go: go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
    • via brew: brew install jsonnet
  2. Install promtool: go get github.com/prometheus/prometheus/cmd/promtool

Generate config files

You can manually generate the alerts, dashboards and rules files:

$ make prometheus_alerts.yaml
$ make prometheus_rules.yaml
$ make dashboards_out

The prometheus_alerts.yaml and prometheus_rules.yaml file then need to passed to your Prometheus server, and the files in dashboards_out need to be imported into you Grafana server. The exact details will depending on how you deploy your monitoring stack.

Running the tests (requires Docker)

Build the mixins, run the tests:

$ docker run -v $(pwd):/tmp --entrypoint "/bin/promtool" prom/prometheus:latest test rules /tmp/tests.yaml

Generate the alerts, rules and dashboards:

$ jsonnet -J vendor -S -e 'std.manifestYamlDoc((import "mixin.libsonnet").prometheusAlerts)' > alerts.yml
$ jsonnet -J vendor -S -e 'std.manifestYamlDoc((import "mixin.libsonnet").prometheusRules)' >files/rules.yml
$ jsonnet -J vendor -m files/dashboards -e '(import "mixin.libsonnet").grafanaDashboards'

Background