зеркало из https://github.com/github/vitess-gh.git
bd5c3db97c
Signed-off-by: Saif Alharthi <saif@saifalharthi.me> Revert previous change (wrong branch!) Signed-off-by: Morgan Tocker <tocker@gmail.com> Resolve yaml conflict Signed-off-by: Saif Alharthi <saif@saifalharthi.me> vrepl: ExternalizeVindex Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com> vrepl: ExternalizeVindex vtctl command Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com> adds position and last token context to parse errors Signed-off-by: cmoog <moogcharlie@gmail.com> adds unit tests for PositionedErr parse error Signed-off-by: cmoog <moogcharlie@gmail.com> Add datadog plugin for tracing Signed-off-by: Karel Alfonso Sague <kalfonso@squareup.com> prepare statment test case. Signed-off-by: pradip parmar <prince.soamedia@gmail.com> prepared_statement: comments changes as per idiomatic go, removed elses. Signed-off-by: pradip parmar <prince.soamedia@gmail.com> prepared_statement: unwanted dependency removed. Signed-off-by: pradip parmar <prince.soamedia@gmail.com> prepare_statement: dummy commit. Signed-off-by: pradip parmar <prince.soamedia@gmail.com> patches error logic Signed-off-by: cmoog <moogcharlie@gmail.com> vitess-mixin: add structure & first 2 dashboards Signed-off-by: Guido Iaquinti <giaquinti@slack-corp.com> Address #5734 by forming MySQL error packet on query parse error during COM_PREPARE Signed-off-by: Jacques Grove <aquarapid@gmail.com> |
||
---|---|---|
.. | ||
alerts | ||
dashboards | ||
lib | ||
rules | ||
.gitignore | ||
Makefile | ||
README.md | ||
config.libsonnet | ||
jsonnetfile.json | ||
mixin.libsonnet |
README.md
(Alpha) Prometheus Monitoring Mixin for Vitess
A set of Grafana dashboards and Prometheus alerts for Vitess.
Prerequisites
-
Install
jsonnet-bundler
:- via
go
:go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
- via
brew
:brew install jsonnet
- via
-
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
- For more motivation, see "The RED Method: How to instrument your services" talk from CloudNativeCon Austin.
- For more information about monitoring mixins, see this design doc.