From 4ee3bd7d592d59164778b9db6d9040aabd1b2dbb Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Tue, 26 Dec 2023 18:34:19 +0800 Subject: [PATCH] fix(build): warn broken links --- docusaurus.config.js | 2 +- .../current/development/monitor/query.md | 24 ++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 239ded4..d43480a 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -29,7 +29,7 @@ const config = { organizationName: 'yunionio', // Usually your GitHub org/user name. projectName: 'cloudpods', // Usually your repo name. - onBrokenLinks: 'throw', + onBrokenLinks: 'warn', onBrokenMarkdownLinks: 'warn', // Even if you don't use internationalization, you can use this field to set diff --git a/i18n/en/docusaurus-plugin-content-docs/current/development/monitor/query.md b/i18n/en/docusaurus-plugin-content-docs/current/development/monitor/query.md index 9ac2d0b..da92b95 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/development/monitor/query.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/development/monitor/query.md @@ -203,12 +203,34 @@ The platform now supports storing monitoring data in either VictoriaMetrics or I Regarding the switch from InfluxDB to VictoriaMetrics, refer to the document: [Switching from InfluxDB to VictoriaMetrics](../../operations/monitoring/migrating-to-vm.md). -### Querying VictoriaMetrics Data +### Querying VictoriaMetrics Data {#query-victoric-metrics-data} If you use VictoriaMetrics as the monitoring backend, you can access the VictoriaMetrics frontend web interface through `https://control-node-IP:30428/vmui/`. VictoriaMetrics uses MetricsQL query syntax, please refer to the following documents for specific usage: + +```bash +# Query CPU usage_active metrics +cpu_usage_active + +# Query the disk free metric and filter it to host_id="32d41926-6038-42a3-8a31-40c08274823b" +disk_free{host_id="32d41926-6038-42a3-8a31-40c08274823b"} + +# Query the disk free indicator, filter by device="sda2", path="/opt/cloud" +disk_free{device="sda2",path="/opt/cloud"} + +# Query metrics starting with mem_ +{__name__=~"mem_.*"} + +# Query the mem used metric, and use the regular expression host=~"ha-test0[1,2].*" +mem_used{host=~"ha-test0[1,2].*"} +``` + +For more information, please refer to the following documentation: + - [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html) +- The following is a description of the telegraf for reporting monitoring metrics: + :::tip Currently, the format for reporting monitoring data is InfluxDB line format. When monitoring metrics are sent to VictoriaMetrics, they will be automatically converted to the corresponding format.