From 3ac1d3d743668cb5022951fdcae2bd1a355bdd4c Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 31 Aug 2023 16:21:38 +0800 Subject: [PATCH] docs: add note for grafana unified alerting (#22672) * docs: add current_user() in function * docs: kill query command need quote around id * docs: refine grafana plugin document * docs: refine tdinsight doc * docs: note about grafana unified alerting --- docs/en/14-reference/07-tdinsight/index.md | 22 +++++---------------- docs/zh/14-reference/07-tdinsight/index.mdx | 22 +++++---------------- 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/docs/en/14-reference/07-tdinsight/index.md b/docs/en/14-reference/07-tdinsight/index.md index 17a8dcd6de..db5097506b 100644 --- a/docs/en/14-reference/07-tdinsight/index.md +++ b/docs/en/14-reference/07-tdinsight/index.md @@ -80,7 +80,7 @@ chmod +x TDinsight.sh ./TDinsight.sh ``` -This script will automatically download the latest [Grafana TDengine data source plugin](https://github.com/taosdata/grafanaplugin/releases/latest) and [TDinsight dashboard](https://github.com/taosdata/grafanaplugin/blob/master/dashboards/TDinsightV3.json) with configurable parameters for command-line options to the [Grafana Provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/) configuration file to automate deployment and updates, etc. With the alert setting options provided by this script, you can also get built-in support for AliCloud SMS alert notifications. +This script will automatically download the latest [Grafana TDengine data source plugin](https://github.com/taosdata/grafanaplugin/releases/latest) and [TDinsight dashboard](https://github.com/taosdata/grafanaplugin/blob/master/dashboards/TDinsightV3.json) with configurable parameters for command-line options to the [Grafana Provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/) configuration file to automate deployment and updates, etc. Assume you use TDengine and Grafana's default services on the same host. Run `. /TDinsight.sh` and open the Grafana browser window to see the TDinsight dashboard. @@ -112,9 +112,6 @@ Install and configure TDinsight dashboard in Grafana on Ubuntu 18.04/20.04 syste -i, --tdinsight-uid Replace with a non-space ASCII code as the dashboard id. [default: tdinsight] -t, --tdinsight-title Dashboard title. [default: TDinsight] -e, --tdinsight-editable If the provisioning dashboard could be editable. [default: false] - --E, --external-notifier Apply external notifier uid to TDinsight dashboard. - ``` Most command-line options can take effect the same as environment variables. @@ -132,26 +129,17 @@ Most command-line options can take effect the same as environment variables. | -i | --tdinsight-uid | TDINSIGHT_DASHBOARD_UID | TDinsight `uid` of the dashboard. [default: tdinsight] | | -t | --tdinsight-title | TDINSIGHT_DASHBOARD_TITLE | TDinsight dashboard title. [Default: TDinsight] | -e | -tdinsight-title | -e | --tdinsight-editable | TDINSIGHT_DASHBOARD_EDITABLE | If the dashboard is configured to be editable. [Default: false] | -e | --external -| -E | --external-notifier | EXTERNAL_NOTIFIER | Apply the external notifier uid to the TDinsight dashboard. | -s Suppose you start a TDengine database on host `tdengine` with HTTP API port `6041`, user `root1`, and password `pass5ord`. Execute the script. +:::note +The `-E` option is deprecated. We use Grafana unified alerting function instead. +::: + ```bash sudo . /TDinsight.sh -a http://tdengine:6041 -u root1 -p pass5ord ``` -We provide a "-E" option to configure TDinsight to use the existing Notification Channel from the command line. Assuming your Grafana user and password is `admin:admin`, use the following command to get the `uid` of an existing notification channel. - -```bash -curl --no-progress-meter -u admin:admin http://localhost:3000/api/alert-notifications | jq -``` - -Use the `uid` value obtained above as `-E` input. - -```bash -./TDinsight.sh -a http://tdengine:6041 -u root1 -p pass5ord -E existing-notifier -``` - If you want to monitor multiple TDengine clusters, you need to set up numerous TDinsight dashboards. Setting up non-default TDinsight requires some changes: the `-n` `-i` `-t` options need to be changed to non-default names, and `-N` and `-L` should also be changed if using the built-in SMS alerting feature. ```bash diff --git a/docs/zh/14-reference/07-tdinsight/index.mdx b/docs/zh/14-reference/07-tdinsight/index.mdx index 31e76b36c8..b66ff23920 100644 --- a/docs/zh/14-reference/07-tdinsight/index.mdx +++ b/docs/zh/14-reference/07-tdinsight/index.mdx @@ -120,7 +120,7 @@ chmod +x TDinsight.sh ./TDinsight.sh ``` -这个脚本会自动下载最新的[Grafana TDengine 数据源插件](https://github.com/taosdata/grafanaplugin/releases/latest) 和 [TDinsight 仪表盘](https://github.com/taosdata/grafanaplugin/blob/master/dashboards/TDinsightV3.json) ,将命令行选项中的可配置参数转为 [Grafana Provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/) 配置文件,以进行自动化部署及更新等操作。利用该脚本提供的告警设置选项,你还可以获得内置的阿里云短信告警通知支持。 +这个脚本会自动下载最新的[Grafana TDengine 数据源插件](https://github.com/taosdata/grafanaplugin/releases/latest) 和 [TDinsight 仪表盘](https://github.com/taosdata/grafanaplugin/blob/master/dashboards/TDinsightV3.json) ,将命令行选项中的可配置参数转为 [Grafana Provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/) 配置文件,以进行自动化部署及更新等操作。 假设您在同一台主机上使用 TDengine 和 Grafana 的默认服务。运行 `./TDinsight.sh` 并打开 Grafana 浏览器窗口就可以看到 TDinsight 仪表盘了。 @@ -152,9 +152,6 @@ Install and configure TDinsight dashboard in Grafana on Ubuntu 18.04/20.04 syste -i, --tdinsight-uid Replace with a non-space ASCII code as the dashboard id. [default: tdinsight] -t, --tdinsight-title Dashboard title. [default: TDinsight] -e, --tdinsight-editable If the provisioning dashboard could be editable. [default: false] - --E, --external-notifier Apply external notifier uid to TDinsight dashboard. - ``` 大多数命令行选项都可以通过环境变量获得同样的效果。 @@ -172,7 +169,10 @@ Install and configure TDinsight dashboard in Grafana on Ubuntu 18.04/20.04 syste | -i | --tdinsight-uid | TDINSIGHT_DASHBOARD_UID | TDinsight 仪表盘`uid`。 [默认值:tdinsight] | | -t | --tdinsight-title | TDINSIGHT_DASHBOARD_TITLE | TDinsight 仪表盘标题。 [默认:TDinsight] | | -e | --tdinsight-editable | TDINSIGHT_DASHBOARD_EDITABLE | 如果配置仪表盘可以编辑。 [默认值:false] | -| -E | --external-notifier | EXTERNAL_NOTIFIER | 将外部通知程序 uid 应用于 TDinsight 仪表盘。 | + +:::note +新版本插件使用 Grafana unified alerting 功能,`-E` 选项不再支持。 +::: 假设您在主机 `tdengine` 上启动 TDengine 数据库,HTTP API 端口为 `6041`,用户为 `root1`,密码为 `pass5ord`。执行脚本: @@ -180,18 +180,6 @@ Install and configure TDinsight dashboard in Grafana on Ubuntu 18.04/20.04 syste ./TDinsight.sh -a http://tdengine:6041 -u root1 -p pass5ord ``` -我们提供了一个“-E”选项,用于从命令行配置 TDinsight 使用现有的通知通道(Notification Channel)。假设你的 Grafana 用户和密码是 `admin:admin`,使用以下命令获取已有的通知通道的`uid`: - -```bash -curl --no-progress-meter -u admin:admin http://localhost:3000/api/alert-notifications | jq -``` - -使用上面获取的 `uid` 值作为 `-E` 输入。 - -```bash -./TDinsight.sh -a http://tdengine:6041 -u root1 -p pass5ord -E existing-notifier -``` - 如果要监控多个 TDengine 集群,则需要设置多个 TDinsight 仪表盘。设置非默认 TDinsight 需要进行一些更改: `-n` `-i` `-t` 选项需要更改为非默认名称,如果使用 内置短信告警功能,`-N` 和 `-L` 也应该改变。 ```bash