From 19f9203c7a69e2f996ded6b1adb24b8b9a12b6a2 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 5 Feb 2024 10:48:12 +0200 Subject: [PATCH] docs: mention -metrics.exposeMetadata command-line flag in `Monitoring` sections This is a follow-up for 326a77c6974454f1585ac662b762138727fa41f4 --- docs/README.md | 9 +++++++-- docs/Single-server-VictoriaMetrics.md | 9 +++++++-- docs/vmagent.md | 6 +++++- docs/vmalert.md | 8 ++++++-- docs/vmauth.md | 6 +++++- 5 files changed, 30 insertions(+), 8 deletions(-) diff --git a/docs/README.md b/docs/README.md index 27bf345a59..cf6ba82d7a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2012,12 +2012,17 @@ mkfs.ext4 ... -O 64bit,huge_file,extent -T huge ## Monitoring VictoriaMetrics exports internal metrics in Prometheus exposition format at `/metrics` page. -These metrics can be scraped via [vmagent](https://docs.victoriametrics.com/vmagent.html) or Prometheus. +These metrics can be scraped via [vmagent](https://docs.victoriametrics.com/vmagent.html) or any other Prometheus-compatible scraper. + +If you use Google Cloud Managed Prometheus for scraping metrics from VictoriaMetrics components, then pass `-metrics.exposeMetadata` +command-line to them, so they add `TYPE` and `HELP` comments per each exposed metric at `/metrics` page. +See [these docs](https://cloud.google.com/stackdriver/docs/managed-prometheus/troubleshooting#missing-metric-type) for details. + Alternatively, single-node VictoriaMetrics can self-scrape the metrics when `-selfScrapeInterval` command-line flag is set to duration greater than 0. For example, `-selfScrapeInterval=10s` would enable self-scraping of `/metrics` page with 10 seconds interval. -_Please note, never use loadbalancer address for scraping metrics. All monitored components should be scraped directly by their address._ +_Please note, never use loadbalancer address for scraping metrics. All the monitored components should be scraped directly by their address._ Official Grafana dashboards available for [single-node](https://grafana.com/grafana/dashboards/10229) and [clustered](https://grafana.com/grafana/dashboards/11176) VictoriaMetrics. diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index 6c5899637c..e0d1b5a5af 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -2020,12 +2020,17 @@ mkfs.ext4 ... -O 64bit,huge_file,extent -T huge ## Monitoring VictoriaMetrics exports internal metrics in Prometheus exposition format at `/metrics` page. -These metrics can be scraped via [vmagent](https://docs.victoriametrics.com/vmagent.html) or Prometheus. +These metrics can be scraped via [vmagent](https://docs.victoriametrics.com/vmagent.html) or any other Prometheus-compatible scraper. + +If you use Google Cloud Managed Prometheus for scraping metrics from VictoriaMetrics components, then pass `-metrics.exposeMetadata` +command-line to them, so they add `TYPE` and `HELP` comments per each exposed metric at `/metrics` page. +See [these docs](https://cloud.google.com/stackdriver/docs/managed-prometheus/troubleshooting#missing-metric-type) for details. + Alternatively, single-node VictoriaMetrics can self-scrape the metrics when `-selfScrapeInterval` command-line flag is set to duration greater than 0. For example, `-selfScrapeInterval=10s` would enable self-scraping of `/metrics` page with 10 seconds interval. -_Please note, never use loadbalancer address for scraping metrics. All monitored components should be scraped directly by their address._ +_Please note, never use loadbalancer address for scraping metrics. All the monitored components should be scraped directly by their address._ Official Grafana dashboards available for [single-node](https://grafana.com/grafana/dashboards/10229) and [clustered](https://grafana.com/grafana/dashboards/11176) VictoriaMetrics. diff --git a/docs/vmagent.md b/docs/vmagent.md index 861ab4d49e..347ec1ab19 100644 --- a/docs/vmagent.md +++ b/docs/vmagent.md @@ -1023,9 +1023,13 @@ See also [cardinality explorer docs](https://docs.victoriametrics.com/#cardinali ## Monitoring `vmagent` exports various metrics in Prometheus exposition format at `http://vmagent-host:8429/metrics` page. -We recommend setting up regular scraping of this page either through `vmagent` itself or by Prometheus +We recommend setting up regular scraping of this page either through `vmagent` itself or by Prometheus-compatible scraper, so that the exported metrics may be analyzed later. +If you use Google Cloud Managed Prometheus for scraping metrics from VictoriaMetrics components, then pass `-metrics.exposeMetadata` +command-line to them, so they add `TYPE` and `HELP` comments per each exposed metric at `/metrics` page. +See [these docs](https://cloud.google.com/stackdriver/docs/managed-prometheus/troubleshooting#missing-metric-type) for details. + Use official [Grafana dashboard](https://grafana.com/grafana/dashboards/12683) for `vmagent` state overview. Graphs on this dashboard contain useful hints - hover the `i` icon at the top left corner of each graph in order to read it. If you have suggestions for improvements or have found a bug - please open an issue on github or add a review to the dashboard. diff --git a/docs/vmalert.md b/docs/vmalert.md index dbb03de82d..346345ff42 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -790,8 +790,12 @@ See more details [here](https://docs.victoriametrics.com/vmalert-tool.html#Unit- `vmalert` exports various metrics in Prometheus exposition format at `http://vmalert-host:8880/metrics` page. The default list of alerting rules for these metric can be found [here](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker). -We recommend setting up regular scraping of this page either through `vmagent` or by Prometheus so that the exported -metrics may be analyzed later. +We recommend setting up regular scraping of this page either through [vmagent](https://docs.victoriametrics.com/vmagent.html) or by Prometheus-compatible scraper, +so that the exported metrics may be analyzed later. + +If you use Google Cloud Managed Prometheus for scraping metrics from VictoriaMetrics components, then pass `-metrics.exposeMetadata` +command-line to them, so they add `TYPE` and `HELP` comments per each exposed metric at `/metrics` page. +See [these docs](https://cloud.google.com/stackdriver/docs/managed-prometheus/troubleshooting#missing-metric-type) for details. Use the official [Grafana dashboard](https://grafana.com/grafana/dashboards/14950) for `vmalert` overview. Graphs on this dashboard contain useful hints - hover the `i` icon in the top left corner of each graph in order to read it. diff --git a/docs/vmauth.md b/docs/vmauth.md index bebf272f0f..8d0623ff3a 100644 --- a/docs/vmauth.md +++ b/docs/vmauth.md @@ -693,7 +693,11 @@ It is recommended protecting the following endpoints with authKeys: ## Monitoring `vmauth` exports various metrics in Prometheus exposition format at `http://vmauth-host:8427/metrics` page. It is recommended setting up regular scraping of this page -either via [vmagent](https://docs.victoriametrics.com/vmagent.html) or via Prometheus, so the exported metrics could be analyzed later. +either via [vmagent](https://docs.victoriametrics.com/vmagent.html) or via Prometheus-compatible scraper, so the exported metrics could be analyzed later. + +If you use Google Cloud Managed Prometheus for scraping metrics from VictoriaMetrics components, then pass `-metrics.exposeMetadata` +command-line to them, so they add `TYPE` and `HELP` comments per each exposed metric at `/metrics` page. +See [these docs](https://cloud.google.com/stackdriver/docs/managed-prometheus/troubleshooting#missing-metric-type) for details. `vmauth` exports the following metrics per each defined user in [`-auth.config`](#auth-config):