Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content/en/docs/reference/features/messaging.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Messaging
weight: 18
aliases: ['/docs/advanced/messaging/','/docs/reference/messaging/']
---

Expand Down
42 changes: 42 additions & 0 deletions content/en/docs/reference/features/monitoring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Monitoring
weight: 8
---

# Current state of monitoring

There are currently three main ways that a Vitess cluster can be monitored. Depending on your needs, you can use any of the following methods:

## 1. Vitess status pages

The status HTML pages of various Vitess components can be accessed by pointing your browser to `http://<host>:<port>/debug/status`. The status pages will often display some basic, but useful, information for monitoring. For example, the status page of a vttablet will show the QPS graph for the past few minutes.

Viewing a status page can be useful since it works out of the box, but it only provides very basic monitoring capabilities.

## 2. Pull-based metrics system

Vitess uses Go’s [expvar package](https://golang.org/pkg/expvar/) to expose various metrics, with the expectation that a user can configure a pull-based metrics system to ingest those metrics. Metrics are published to `http://<host>:<port>/debug/vars` as JSON key-value pairs, which should be easy for any metrics system to parse.

Scraping Vitess variables is a good way to integrate Vitess into an existing monitoring system, and is useful for building up detailed monitoring dashboards. It is also the officially supported way for monitoring Vitess.

## 3. Push-based metrics system

Vitess also includes support for push-based metrics systems via plug-ins. Each Vitess component would need to be run with the `--emit_stats` flag.

By default, the stats_emit_period is 60s, so each component will push stats to the selected backend every minute. This is configurable via the `--stats_emit_period` flag.

Vitess has preliminary plug-ins to support OpenTSDB as a push-based metrics backend.

It should be fairly straightforward to write your own plug-in, if you want to support a different backend. The plug-in package simply needs to implement the `PushBackend` interface of the `stats` package. For an example, you can see the [OpenTSDB plugin](https://github.com/vitessio/vitess/blob/master/go/stats/opentsdb/opentsdb.go).

Once you’ve written the backend plug-in, you also need to register the plug-in from within all the relevant Vitess binaries. An example of how to do this can be seen in [this pull request](https://github.com/vitessio/vitess/pull/469).

You can then specify that Vitess should publish stats to the backend that you’re targeting by using the `--stats_backend` flag.

Connecting Vitess to a push-based metrics system can be useful if you’re already running a push-based system that you would like to integrate into.

# Monitoring with Kubernetes

The existing methods for integrating metrics are not supported in a Kubernetes environment by the Vitess team yet, but are on the roadmap for the future. However, it should be possible to get the Prometheus backend working with Kubernetes.

In the meantime, if you run into issues or have questions, please post on our [Slack](https://vitess.io/slack).
2 changes: 1 addition & 1 deletion content/en/docs/reference/features/mysql-replication.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Replication
weight: 5
weight: 9
aliases: ['/docs/reference/row-based-replication/','/docs/reference/vitess-replication/','/docs/reference/mysql-replication/']
---

Expand Down
1 change: 1 addition & 0 deletions content/en/docs/reference/features/recovery.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Point In Time Recovery
weight: 17
aliases: ['/docs/recovery/pitr','/docs/reference/pitr/']
---

Expand Down
1 change: 1 addition & 0 deletions content/en/docs/reference/features/schema-management.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Schema Management
weight: 16
aliases: ['/docs/schema-management/','/docs/user-guides/schema-management/','/docs/reference/schema-management/']
---

Expand Down
1 change: 1 addition & 0 deletions content/en/docs/reference/features/schema-routing-rules.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Schema Routing Rules
weight: 15
aliases: ['/docs/schema-management/routing-rules/','/docs/reference/schema-routing-rules/']
---

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/reference/features/sharding.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Sharding
description: Shard widely, shard often.
weight: 5
weight: 1
aliases: ['/docs/sharding/','/user-guide/sharding.html','/docs/reference/sharding/']
---

Expand Down
1 change: 1 addition & 0 deletions content/en/docs/reference/features/table-lifecycle.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Table lifecycle
weight: 22
aliases: ['/docs/user-guides/table-lifecycle/','/docs/reference/table-lifecycle/']
---

Expand Down
1 change: 1 addition & 0 deletions content/en/docs/reference/features/tablet-throttler.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Tablet throttler
weight: 21
aliases: ['/docs/user-guides/tablet-throttler/','/docs/reference/tablet-throttler/']
---

Expand Down
1 change: 1 addition & 0 deletions content/en/docs/reference/features/topology-service.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Topology Service
weight: 20
aliases: ['/docs/user-guides/topology-service/','/docs/reference/topology-service/']
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Transport Security Model
weight: 12
aliases: ['/docs/user-guides/transport-security-model/','/docs/reference/transport-security-model/']
---

Expand Down
1 change: 1 addition & 0 deletions content/en/docs/reference/features/two-phase-commit.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Two-Phase Commit
weight: 11
aliases: ['/docs/launching/twopc/','/docs/reference/two-phase-commit/']
---

Expand Down
1 change: 1 addition & 0 deletions content/en/docs/reference/features/vindexes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Vindexes
weight: 10
aliases: ['/docs/schema-management/consistent-lookup/','/docs/reference/vindexes/']
---

Expand Down
1 change: 1 addition & 0 deletions content/en/docs/reference/features/vreplication.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: VReplication
weight: 2
aliases: ['/docs/advanced/vreplication/','/user-guide/update-stream/','/docs/reference/vreplication/']
---

Expand Down
1 change: 1 addition & 0 deletions content/en/docs/reference/features/vschema.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: VSchema
weight: 9
aliases: ['/docs/schema-management/vschema/','/docs/reference/vschema/']
---

Expand Down