Grafana dashboard: TDinsight
Description: Monitor TDengine database with alerts

# TDinsight - A Zero-dependency Monitoring Solution For [TDengine] with [Grafana]

- [Requirements](#requirements)
- [Install Grafana](#install-grafana)
  - [Install Grafana on Debian or Ubuntu](#install-grafana-on-debian-or-ubuntu)
  - [Install Grafana on CentOS/RHEL](#install-grafana-on-centosrhel)
- [Setup TDinsight Automatically](#setup-tdinsight-automatically)
- [Setup TDinsight Manually](#setup-tdinsight-manually)
  - [Install TDengine Data Source Plugin](#install-tdengine-data-source-plugin)
  - [Configure Grafana](#configure-grafana)
  - [Start Grafana Service](#start-grafana-service)
  - [Login to Grafana](#login-to-grafana)
  - [Add TDengine Data Source](#add-tdengine-data-source)
  - [Import TDengine Dashboard](#import-tdengine-dashboard)
- [TDinsight Dashboard Details](#tdinsight-dashboard-details)
  - [Cluster Status](#cluster-status)
  - [DNodes Status](#dnodes-status)
  - [MNodes Overview](#mnodes-overview)
  - [Requests](#requests)
  - [Database for each `$database`](#database-for-each-database)
  - [DNode Usage for each `$fqdn`](#dnode-usage-for-each-fqdn)
  - [Login History](#login-history)
- [An All-in-one Docker Example](#an-all-in-one-docker-example)

## Requirements

At least, you must have a single-node [TDengine] server or a [TDengine] cluster with multiple nodes, and a server host for [Grafana]. This dashboard requires new log database(since v2.3.3.0), including `cluster_info` `dnodes_info` `vgroups_info` tables and so on.

## Install Grafana

The feature-rich [Grafana] dashboard for [TDengine] (cluster or not) requires Grafana 7.x or 8.x, so we recommend to use the latest [Grafana] 7/8 version here. You can install [Grafana] in any [supported OS](https://grafana.com/docs/grafana/latest/installation/requirements/#supported-operating-systems), follow the [installation instructions](https://grafana.com/docs/grafana/latest/installation/).

### Install Grafana on Debian or Ubuntu

For Debian or Ubuntu os, the first option is to use grafana APT repository. Here is how-to install it from scratch:

```bash
sudo apt-get install -y apt-transport-https
sudo apt-get install -y software-properties-common wget
wget -q -O - https://packages.grafana.com/gpg.key |\
  sudo apt-key add -
echo "deb https://packages.grafana.com/oss/deb stable main" |\
  sudo tee -a /etc/apt/sources.list.d/grafana.list
sudo apt-get update
sudo apt-get install grafana
```

### Install Grafana on CentOS/RHEL

You can install it from the official YUM repository.

```bash
sudo tee /etc/yum.repos.d/grafana.repo << EOF
[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
EOF
sudo yum install grafana
```

Or install with RPM:

```bash
wget https://dl.grafana.com/oss/release/grafana-7.5.11-1.x86_64.rpm
sudo yum install grafana-7.5.11-1.x86_64.rpm
# it's ok to use in one line
sudo yum install \
  https://dl.grafana.com/oss/release/grafana-7.5.11-1.x86_64.rpm
```

## Setup TDinsight Automatically

We've created a [`TDinsight.sh`](https://github.com/taosdata/grafanaplugin/releases/latest/download/TDinsight.sh) script for automation with Grafana [provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/) strategy.

You can download the script by `wget` or other tools:

```bash
wget https://github.com/taosdata/grafanaplugin/releases/latest/download/TDinsight.sh
chmod +x TDinsight.sh
```

This script will automatically download the latest [TDengine data source plugin](https://github.com/taosdata/grafanaplugin/releases/latest) and [TDinsight dashboard](https://grafana.com/grafana/dashboards/15167), covert them to provisioning configurations and setup TDinsight dashboard. With some more alert options, you will get the alert notification feature within an one-line command.

For the most simple use case, suppose you're serving TDengine and Grafana on the same host with both default options. Running `./TDinsight.sh` and opening Grafana url are the only things you need to setup TDsight.

Here is the usage of `TDinsight.sh`:

```bash
Usage:
   ./TDinsight.sh
   ./TDinsight.sh -h|--help
   ./TDinsight.sh -n <ds-name> -a <api-url> -u <user> -p <password>

Install and configure TDinsight dashboard in Grafana on ubuntu 18.04/20.04 system.

-h, -help,          --help                  Display help

-V, -verbose,       --verbose               Run script in verbose mode. Will print out each step of execution.

-v, --plugin-version <version>              TDengine datasource plugin version, [default: latest]

-P, --grafana-provisioning-dir <dir>        Grafana provisioning directory, [default: /etc/grafana/provisioning/]
-G, --grafana-plugins-dir <dir>             Grafana plugins directory, [default: /var/lib/grafana/plugins]
-O, --grafana-org-id <number>               Grafana orgnization id. [default: 1]

-n, --tdengine-ds-name <string>             TDengine datasource name, no space. [default: TDengine]
-a, --tdengine-api <url>                    TDengine REST API endpoint. [default: http://127.0.0.1:6041]
-u, --tdengine-user <string>                TDengine user name. [default: root]
-p, --tdengine-password <string>            TDengine password. [default: taosdata]

-i, --tdinsight-uid <string>                Replace with a non-space ascii code as the dashboard id. [default: tdinsight]
-t, --tdinsight-title <string>              Dashboard title. [default: TDinsight]
-e, --tdinsight-editable                    If the provisioning dashboard could be editable. [default: false]

-E, --external-notifier <string>            Apply external notifier uid to TDinsight dashboard.

Aliyun SMS as Notifier:
-s, --sms-enabled                           To enable tdengine-datasource plugin builtin aliyun sms webhook.
-N, --sms-notifier-name <string>            Provisioning notifier name.[default: TDinsight Builtin SMS]
-U, --sms-notifier-uid <string>             Provisioning notifier uid, use lowercase notifier name by default.
-D, --sms-notifier-is-default               Set notifier as default.
-I, --sms-access-key-id <string>            Aliyun sms access key id
-K, --sms-access-key-secret <string>        Aliyun sms access key secret
-S, --sms-sign-name <string>                Sign name
-C, --sms-template-code <string>            Template code
-T, --sms-template-param <string>           Template param, a escaped json string like '{"alarm_level":"%s","time":"%s","name":"%s","content":"%s"}'
-B, --sms-phone-numbers <string>            Comma-separated numbers list, eg "189xxxxxxxx,132xxxxxxxx"
-L, --sms-listen-addr <string>              [default: 127.0.0.1:9100]
```

Most of the CLI options are environment variable recognizable.

| short | long                       | env                          | description                                                            |
| ----- | -------------------------- | ---------------------------- | ---------------------------------------------------------------------- |
| -v    | --plugin-version           | TDENGINE_PLUGIN_VERSION      | TDengine datasource plugin version, default is latest.                 |
| -P    | --grafana-provisioning-dir | GF_PROVISIONING_DIR          | Grafana provisioning directory, [default: /etc/grafana/provisioning/]  |
| -G    | --grafana-plugins-dir      | GF_PLUGINS_DIR               | Grafana plugins directory, default is `/var/lib/grafana/plugins`.      |
| -O    | --grafana-org-id           | GF_ORG_ID                    | Grafana organization id, default is 1.                                 |
| -n    | --tdengine-ds-name         | TDENGINE_DS_NAME             | TDengine datasource name, default is TDengine.                         |
| -a    | --tdengine-api             | TDENGINE_API                 | TDengine REST API endpoint. default is `http://127.0.0.1:6041`.        |
| -u    | --tdengine-user            | TDENGINE_USER                | TDengine user name. [default: root]                                    |
| -p    | --tdengine-password        | TDENGINE_PASSWORD            | TDengine password. [default: taosdata]                                 |
| -i    | --tdinsight-uid            | TDINSIGHT_DASHBOARD_UID      | TDinsight dashboard `uid`. [default: tdinsight]                        |
| -t    | --tdinsight-title          | TDINSIGHT_DASHBOARD_TITLE    | TDinsight dashboard title. [default: TDinsight]                        |
| -e    | --tdinsight-editable       | TDINSIGHT_DASHBOARD_EDITABLE | If the provisioning dashboard could be editable. [default: false]      |
| -E    | --external-notifier        | EXTERNAL_NOTIFIER            | Apply external notifier uid to TDinsight dashboard.                    |
| -s    | --sms-enabled              | SMS_ENABLED                  | To enable tdengine-datasource plugin builtin aliyun sms webhook.       |
| -N    | --sms-notifier-name        | SMS_NOTIFIER_NAME            | Provisioning notifier name.[default: TDinsight Builtin SMS]            |
| -U    | --sms-notifier-uid         | SMS_NOTIFIER_UID             | Provisioning notifier uid, use lowercase notifier name by default.     |
| -D    | --sms-notifier-is-default  | SMS_NOTIFIER_IS_DEFAULT      | Set notifier as default.                                               |
| -I    | --sms-access-key-id        | SMS_ACCESS_KEY_ID            | Aliyun sms access key id                                               |
| -K    | --sms-access-key-secret    | SMS_ACCESS_KEY_SECRET        | Aliyun sms access key secret                                           |
| -S    | --sms-sign-name            | SMS_SIGN_NAME                | Sign name                                                              |
| -C    | --sms-template-code        | SMS_TEMPLATE_CODE            | Template code                                                          |
| -T    | --sms-template-param       | SMS_TEMPLATE_PARAM           | Template params json format                                            |
| -B    | --sms-phone-numbers        | SMS_PHONE_NUMBERS            | Comma-separated numbers list, eg `"189xxxxxxxx,132xxxxxxxx"`           |
| -L    | --sms-listen-addr          | SMS_LISTEN_ADDR              | The builtin sms webhook listening address, default is `127.0.0.1:9100` |

Suppose you are serving TDengine on host `tdengine`, with HTTP API port `6041`, user `root1`, password `pass5ord`. Use the script as:

```bash
sudo ./TDinsight.sh -a http://tdengine:6041 -u root1 -p pass5ord
```

We are providing a `-E` options to configure existing notification channel for TDinsight from command line. Suppose your Grafana user and password is `admin:admin`, use the following command to get the notification channels:

```bash
curl --no-progress-meter -u admin:admin http://localhost:3000/api/alert-notifications | jq
```

Here, we use `uid` property of the notification channel as `-E` input.

```bash
sudo ./TDinsight.sh -a http://tdengine:6041 -u root1 -p pass5ord -E existing-notifier
```

If you want to use [Aliyun SMS](https://www.aliyun.com/product/sms) service as notification channel, you should enable it with `-s` flag and the settings:

- `-N`: Notification channel name, default is `TDinsight Builtin SMS`.
- `-U`: Notification channel uid, default is lowercase of the `name` with any other characters replaced with -, for default `-N`, it is `tdinsight-builtin-sms`.
- `-I`: Aliyun SMS access key id.
- `-K`: Aliyun SMS access key secret.
- `-S`: Aliyun SMS sign name.
- `-C`: Aliyun SMS template id.
- `-T`: Aliyun SMS template params JSON format, `'{"alarm_level":"%s","time":"%s","name":"%s","content":"%s"}'`. It has four params: alerting level, alerting time, the name of alert rule, and the content text of the alert rule.
- `-B`: Target phone numbers list, separated by comma `,`.

If you want to monitor multiple TDengine clusters, you need to setup multiple TDinsight dashboards. There's some required changes to setup non-default TDinsight - `-n` `-i` `-t` options are need to be changed to some other names, if you are using SMS alerting feature, `-N` and `-L` should be changed too.

```bash
sudo ./TDengine.sh -n TDengine-Env1 -a http://another:6041 -u root -p taosdata -i tdinsight-env1 -t 'TDinsight Env1'
# if use builtin sms notifier.
sudo ./TDengine.sh -n TDengine-Env1 -a http://another:6041 -u root -p taosdata -i tdinsight-env1 -t 'TDinsight Env1' \
  -s -N 'Env1 SMS' -I xx -K xx -S xx -C SMS_XX -T '' -B 00000000000 -L 127.0.0.01:10611
```

Note that, the provisioning data sources, notification channels and dashboards are not changeable at frontend. You should update the configuration by this script again or change the provisioning configurations manually. The provisioning configurations are all located in `/etc/grafana/provisioning` directory (the directory is grafana default, change it with `-P` option as you need).

For special use cases, `-O` would set the organization id when you use Grafana Cloud or use a different organization. `-G` let you choose the grafana plugins install directory. `-e` would set the dashboard to be editable.

## Setup TDinsight Manually

### Install TDengine Data Source Plugin

Install the TDengine data-source plugin from GitHub.

```bash
git clone --depth 1 https://github.com/taosdata/grafanaplugin.git
mkdir -p /var/lib/grafana/plugins/tdengine
cp -rf dist/* /var/lib/grafana/plugins/tdengine
```

### Configure Grafana

Add following lines to `/etc/grafana/grafana.ini`.

```ini
[plugins]
allow_loading_unsigned_plugins = tdengine-datasource
```

### Start Grafana Service

```bash
systemctl enable grafana-server
systemctl start grafana-server
```

### Login to Grafana

Open the default grafana url: `http://localhost:3000` in your web browser.
The default username/password is bot `admin`.
Grafana would ask you to change the password after first login.

### Add TDengine Data Source

Point to **Configurations** -> **Data Sources** menu and then **Add data source** button.

![add data source button](https://raw.githubusercontent.com/taosdata/grafanaplugin/master/assets/howto-add-datasource-button.png)

Search and choose **TDengine**.
![add data source](https://raw.githubusercontent.com/taosdata/grafanaplugin/master/assets/howto-add-datasource-tdengine.png)

Configure TDengine data source.

![data source configuration](https://raw.githubusercontent.com/taosdata/grafanaplugin/master/assets/howto-add-datasource.png)

Save and test it, it should say 'TDengine Data source is working'.

![data source test](https://raw.githubusercontent.com/taosdata/grafanaplugin/master/assets/howto-add-datasource-test.png)

### Import TDengine Dashboard

Point to **+** / **Create** - **import** (or `/dashboard/import` url).

![import dashboard and config](https://raw.githubusercontent.com/taosdata/grafanaplugin/master/assets/import_dashboard.png)

Use the dashboard id `15167` via grafana.com.

![import via grafana.com](https://raw.githubusercontent.com/taosdata/grafanaplugin/master/assets/import-dashboard-15167.png)

Then it's all done.

The full page view for TDengine will like below.

![display](https://raw.githubusercontent.com/taosdata/grafanaplugin/master/assets/TDinsight-full.png)

## TDinsight Dashboard Details

The TDinsight dashboard aims to provide TDengine cluster resources usage and status of [dnodes, mdodes, vnodes](https://www.taosdata.com/cn/documentation/architecture#cluster), or databases. There're several partitions of metrics.

### Cluster Status

![tdinsight-mnodes-overview](https://raw.githubusercontent.com/taosdata/grafanaplugin/master/assets/TDinsight-1-cluster-status.png)

Include cluster current infomation and status (left-right, top-down).

- **First EP**: First EP in current TDengine cluster.
- **Version**: Server version of MNode.
- **Master Uptime**: Time that the current master mnode elected.
- **Expire Time** - Expire time for enterprise version.
- **Used Measuring Points** - Used measuring points for enterprise version.
- **Databases** - The total number of databases.
- **Connections** - The connections number in current time.
- **DNodes/MNodes/VGroups/VNodes**: Total and alive number for each kind of resources.
- **DNodes/MNodes/VGroups/VNodes Alive Percent**: alive number / total number for each kind of resources, with alert rule enabled, by default it will be triggered when the resource is not 100% alive.
- **Messuring Points Used**: Used measuring points for enterprise version with alert enabled.
- **Grants Expire Time**: Expire time for enterprise version with alert enabled.
- **Error Rate**: The total error rate for the cluster with alert enabled.
- **Variables**: generated by `show variables` command and displayed as Table view.

### DNodes Status

![tdinsight-mnodes-overview](https://raw.githubusercontent.com/taosdata/grafanaplugin/master/assets/TDinsight-2-dnodes.png)

- **DNodes Status**: Simple table view for `show dnodes`.
- **DNodes Lifetime**: The time elapsed from dnode created.
- **DNodes Number**: DNodes number changes time-series graph.
- **Offline Reasons**: Offline reasons pie chart if any dnode status is offline.

### MNodes Overview

![tdinsight-mnodes-overview](https://raw.githubusercontent.com/taosdata/grafanaplugin/master/assets/TDinsight-3-mnodes.png

1. **MNodes Status**: Simple table view for `show mnodes`.
2. **MNodes Number**: like `DNodes Number`, but for mnodes.

### Requests

![tdinsight-requests](https://raw.githubusercontent.com/taosdata/grafanaplugin/master/assets/TDinsight-4-requests.png)

1. **Requests (Inserts)**: Interts requests batches and couts with success rate time-series data.
2. **Requests Rate(Inserts per Second)**: Insert count per second rate.
3. **Requests (Selects)**: Select requests count and rate.
4. **Requests (HTTP)**: HTTP requests count and rate.

### Database for each `$database`

![tdinsight-database](https://raw.githubusercontent.com/taosdata/grafanaplugin/master/assets/TDinsight-5-database.png)

1. **STables**: Number of stables.
2. **Total Tables**: Number of all tables.
3. **Sub Tables**: Number of tables that is sub table of a stable.
4. **Tables**: Tables changes time-series data.
5. **Tables Number Foreach VGroups**: Tables number for each vgroups.

### DNode Usage for each `$fqdn`

![dnode-usage](https://raw.githubusercontent.com/taosdata/grafanaplugin/master/assets/TDinsight-6-dnode-usage.png)

DNode resources details for specific node with grafana query type variable `$fqdn` (from `select tbname from log.dn`), including:

- Current memory usage, cpu usage, band speed, io read and write rate, disk used, etc.
- Max resources usage in last hour or some time.
- CPU graph view.
- Memory usage.
- Disk used percent: graph view with alert rule.
- Disk used.
- Requests count per minute.
- IO rate (read/write), with comparison to that in last hour.

Here's the metrics list:

1. **Uptime**: Elapsed time from dnode created.
2. **Has MNodes?**: If the dnodes has mnode.
3. **CPU Cores**: Number of CPU cores.
4. **VNodes Number**: VNodes number of the current dnode.
5. **VNodes Masters**: The number of vnodes that are in master role.
6. **Current CPU Usage of taosd**: CPU usage of taosd process.
7. **Current Memory Usage of taosd**: Memory usage of taosd process.
8. **Disk Used**: Total disk usage percent of taosd data directory.
9. **CPU Usage**: Process and system CPU usage.
10. **RAM Usage**: RAM used metrics time-series view.
11. **Disk Used**: Disk used for each level.
12. **Disk Increasing Rate per Minute**: Disk increasing rate per minute.
13. **Disk IO**: Process read/write bytes time-series data and view.
14. **Net IO**: Total in/out bits for all networks except lo.

### Login History

![login-history](https://raw.githubusercontent.com/taosdata/grafanaplugin/master/assets/TDinsight-7-login-history.png)

Currently only report login count per minute.

## An All-in-one Docker Example

```bash
git clone --depth 1 https://github.com/taosdata/grafanaplugin.git
cd grafanaplugin
```

Modify as needed in the `docker-compose.yml` file:

```yaml
version: "3.7"

services:
  grafana:
    image: grafana/grafana:7.5.10
    volumes:
      - ./dist:/var/lib/grafana/plugins/tdengine-datasource
      - ./grafana/grafana.ini:/etc/grafana/grafana.ini
      - ./grafana/provisioning/:/etc/grafana/provisioning/
      - grafana-data:/var/lib/grafana
    environment:
      TDENGINE_API: ${TDENGINE_API}
      TDENGINE_USER: ${TDENGINE_USER}
      TDENGINE_PASS: ${TDENGINE_PASS}
      SMS_ACCESS_KEY_ID: ${SMS_ACCESS_KEY_ID}
      SMS_ACCESS_KEY_SECRET: ${SMS_ACCESS_KEY_SECRET}
      SMS_SIGN_NAME: ${SMS_SIGN_NAME}
      SMS_TEMPLATE_CODE: ${SMS_TEMPLATE_CODE}
      SMS_TEMPLATE_PARAM: "${SMS_TEMPLATE_PARAM}"
      SMS_PHONE_NUMBERS: $SMS_PHONE_NUMBERS
      SMS_LISTEN_ADDR: ${SMS_LISTEN_ADDR}
    ports:
      - 3000:3000

volumes:
  grafana-data:
```

Replace the environment variables in `docker-compose.yml` or set it `.env`, then start Grafana with [docker-compose].

```bash
docker-compose up -d
```

TDinsight is builtin, please go to <http://localhost:3000/d/tdinsight/> to see the dashboard.

[Grafana]: https://grafana.com
[TDengine]: https://www.taosdata.com
[docker-compose]: https://docs.docker.com/compose/


{
  "__inputs": [
    {
      "name": "DS_TDENGINE",
      "label": "TDengine",
      "description": "",
      "type": "datasource",
      "pluginId": "tdengine-datasource",
      "pluginName": "TDengine"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar gauge",
      "version": ""
    },
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.5.10"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "panel",
      "id": "piechart",
      "name": "Pie chart v2",
      "version": ""
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "tdengine-datasource",
      "name": "TDengine",
      "version": "3.1.2"
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Monitor TDengine database with alerts",
  "editable": true,
  "gnetId": 15167,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1637590763527,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "datasource": "${DS_TDENGINE}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 57,
      "panels": [],
      "title": "Cluster Status",
      "type": "row"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 24,
        "x": 0,
        "y": 1
      },
      "id": 32,
      "options": {
        "content": "<h1><center>TDengine Cluster Dashboard (First EP: ${firstEp}, Version: ${version})</center></h1>",
        "mode": "markdown"
      },
      "pluginVersion": "7.5.10",
      "repeatDirection": "h",
      "targets": [
        {
          "alias": "mnodes",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "show mnodes",
          "target": "select metric",
          "timeshift": {
            "period": null
          },
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "-- OVERVIEW --",
      "transformations": [
        {
          "id": "calculateField",
          "options": {
            "binary": {
              "left": "Time",
              "operator": "+",
              "reducer": "sum",
              "right": ""
            },
            "mode": "binary",
            "reduce": {
              "reducer": "sum"
            }
          }
        }
      ],
      "type": "text"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 0,
        "y": 4
      },
      "id": 73,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select last(first_ep) from log.cluster_info",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "title": "First EP",
      "type": "stat"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 3,
        "y": 4
      },
      "id": 74,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select last(version) from log.cluster_info",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "title": "Version",
      "type": "stat"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "description": "MNode 被选举后经过的时长",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 6,
        "y": 4
      },
      "id": 72,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select last(master_uptime) from log.cluster_info",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "title": "Master Uptime",
      "transformations": [
        {
          "id": "reduce",
          "options": {
            "includeTimeField": false,
            "mode": "reduceFields",
            "reducers": [
              "lastNotNull"
            ]
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "description": "企业版授权到期时间",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 9,
        "y": 4
      },
      "id": 99,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select last(expire_time) from log.grants_info",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "title": "Expire Time",
      "transformations": [],
      "type": "stat"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "description": "企业版授权已用测点数",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "count"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byFrameRefID",
              "options": "A"
            },
            "properties": [
              {
                "id": "noValue",
                "value": "unlimited"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 12,
        "y": 4
      },
      "id": 100,
      "options": {
        "displayMode": "gradient",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": true,
        "text": {}
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select max(timeseries_used) as used ,max(timeseries_total) as total from log.grants_info where ts >= $from and ts <= $to interval(30s)",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "title": "Used Measuring Points",
      "transformations": [],
      "type": "bargauge"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "description": "数据库个数",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 2,
        "x": 16,
        "y": 4
      },
      "id": 65,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": true
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.5.10",
      "repeatDirection": "h",
      "targets": [
        {
          "alias": "dnodes",
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "show databases;",
          "target": "select metric",
          "timeshift": {
            "period": null
          },
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Databases",
      "transformations": [
        {
          "id": "reduce",
          "options": {
            "includeTimeField": false,
            "mode": "reduceFields",
            "reducers": [
              "count"
            ]
          }
        },
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "status"
              ]
            }
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "description": "所有数据库的表数量之和",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 18,
        "y": 4
      },
      "id": 68,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": true
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.5.10",
      "repeatDirection": "h",
      "targets": [
        {
          "alias": "dnodes",
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "show databases;",
          "target": "select metric",
          "timeshift": {
            "period": null
          },
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Tables",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "ntables"
              ]
            }
          }
        },
        {
          "id": "reduce",
          "options": {
            "includeTimeField": false,
            "mode": "reduceFields",
            "reducers": [
              "sum"
            ]
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 21,
        "y": 4
      },
      "id": 82,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select connections_total from log.cluster_info where ts >= $from and ts <= $to",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "title": "Connections",
      "type": "stat"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "description": "当前TDengine集群DNode数量，Alive 为存活，Total 为所有",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 6,
        "x": 0,
        "y": 8
      },
      "id": 75,
      "options": {
        "displayMode": "basic",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": true,
        "text": {}
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "alias": "",
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select dnodes_total as total,dnodes_alive as alive from log.cluster_info where ts >= $from and ts <= $to",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "DNodes",
      "transformations": [],
      "type": "bargauge"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "description": "当前TDengine集群MNode数量，Alive 为存活，Total 为所有",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 6,
        "x": 6,
        "y": 8
      },
      "id": 101,
      "options": {
        "displayMode": "basic",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": true,
        "text": {}
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "alias": "",
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select mnodes_total as total,mnodes_alive as alive from log.cluster_info where ts >= $from and ts <= $to",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "MNodes",
      "transformations": [],
      "type": "bargauge"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "description": "当前TDengine集群 VGroups 数量，Alive 为存活，Total 为所有",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 6,
        "x": 12,
        "y": 8
      },
      "id": 102,
      "options": {
        "displayMode": "basic",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": true,
        "text": {}
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "alias": "",
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select vgroups_total as total, vgroups_alive as alive from log.cluster_info where ts >= $from and ts <= $to",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "VGroups",
      "transformations": [],
      "type": "bargauge"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "description": "当前TDengine集群 VNodes 数量，Alive 为存活，Total 为所有",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 6,
        "x": 18,
        "y": 8
      },
      "id": 103,
      "options": {
        "displayMode": "basic",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": true,
        "text": {}
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "alias": "",
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select vnodes_total as total, vnodes_alive as alive from log.cluster_info where ts >= $from and ts <= $to",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "VNodes",
      "transformations": [],
      "type": "bargauge"
    },
    {
      "alert": {
        "alertRuleTags": {},
        "conditions": [
          {
            "evaluator": {
              "params": [
                1
              ],
              "type": "lt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "A",
                "5m",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "avg"
            },
            "type": "query"
          }
        ],
        "executionErrorState": "alerting",
        "for": "5m",
        "frequency": "1m",
        "handler": 1,
        "message": "DNodes异常",
        "name": "DNodes Alive Percent",
        "noDataState": "no_data",
        "notifications": [
          {
            "uid": "tdinsight-builtin-sms"
          }
        ]
      },
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 0,
        "y": 12
      },
      "hiddenSeries": false,
      "id": 84,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.10",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select avg(dnodes_alive)/avg(dnodes_total) from log.cluster_info where ts >= $from and ts <= $to interval(30s) fill(null)",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "lt",
          "value": 1,
          "visible": true
        }
      ],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "DNodes Alive Percent",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "percentunit",
          "label": null,
          "logBase": 1,
          "max": "1",
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "alert": {
        "alertRuleTags": {},
        "conditions": [
          {
            "evaluator": {
              "params": [
                1
              ],
              "type": "lt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "A",
                "5m",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "avg"
            },
            "type": "query"
          }
        ],
        "executionErrorState": "alerting",
        "for": "5m",
        "frequency": "1m",
        "handler": 1,
        "message": "MNodes异常",
        "name": "MNodes Alive Percent",
        "noDataState": "keep_state",
        "notifications": [
          {
            "uid": "tdinsight-builtin-sms"
          }
        ]
      },
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 6,
        "y": 12
      },
      "hiddenSeries": false,
      "id": 87,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.10",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select avg(mnodes_alive)/avg(mnodes_total) from log.cluster_info where ts >= $from and ts <= $to interval(30s) fill(null)",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "lt",
          "value": 1,
          "visible": true
        }
      ],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "MNodes Alive Percent",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "percentunit",
          "label": null,
          "logBase": 1,
          "max": "1",
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "alert": {
        "alertRuleTags": {},
        "conditions": [
          {
            "evaluator": {
              "params": [
                1
              ],
              "type": "lt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "A",
                "5m",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "avg"
            },
            "type": "query"
          }
        ],
        "executionErrorState": "alerting",
        "for": "5m",
        "frequency": "1m",
        "handler": 1,
        "message": "VGroups异常",
        "name": "VGroups Alive Percent",
        "noDataState": "keep_state",
        "notifications": [
          {
            "uid": "tdinsight-builtin-sms"
          }
        ]
      },
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 12,
        "y": 12
      },
      "hiddenSeries": false,
      "id": 85,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.10",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select avg(vgroups_alive)/avg(vgroups_total) from log.cluster_info where ts >= $from and ts <= $to interval(30s) fill(null)",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "lt",
          "value": 1,
          "visible": true
        }
      ],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "VGroups Alive Percent",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "percentunit",
          "label": null,
          "logBase": 1,
          "max": "1",
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "alert": {
        "alertRuleTags": {},
        "conditions": [
          {
            "evaluator": {
              "params": [
                1
              ],
              "type": "lt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "A",
                "5m",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "avg"
            },
            "type": "query"
          }
        ],
        "executionErrorState": "alerting",
        "for": "5m",
        "frequency": "1m",
        "handler": 1,
        "message": "VNodes 异常",
        "name": "VNodes Alive Percent",
        "noDataState": "keep_state",
        "notifications": [
          {
            "uid": "tdinsight-builtin-sms"
          }
        ]
      },
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 18,
        "y": 12
      },
      "hiddenSeries": false,
      "id": 86,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.10",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select avg(vnodes_alive)/avg(vnodes_total) from log.cluster_info where ts >= $from and ts <= $to interval(30s) fill(null)",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "lt",
          "value": 1,
          "visible": true
        }
      ],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "VNodes Alive Percent",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "percentunit",
          "label": null,
          "logBase": 1,
          "max": "1",
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "alert": {
        "alertRuleTags": {},
        "conditions": [
          {
            "evaluator": {
              "params": [
                0.95
              ],
              "type": "gt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "A",
                "1m",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "avg"
            },
            "type": "query"
          },
          {
            "evaluator": {
              "params": [
                0,
                1
              ],
              "type": "within_range"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "A",
                "1m",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "avg"
            },
            "type": "query"
          }
        ],
        "executionErrorState": "keep_state",
        "for": "5m",
        "frequency": "1m",
        "handler": 1,
        "message": "授权测点剩余不足5%",
        "name": "DNodes Alive Percent",
        "noDataState": "ok",
        "notifications": [
          {
            "uid": "tdinsight-builtin-sms"
          }
        ]
      },
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 0,
        "y": 18
      },
      "hiddenSeries": false,
      "id": 104,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.10",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "percent",
          "yaxis": 2
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select avg(timeseries_used)/avg(timeseries_total) as percent from log.grants_info where ts >= $from and ts <= $to interval(30s) fill(null)",
          "target": "select metric",
          "type": "timeserie"
        },
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "hide": false,
          "queryType": "SQL",
          "refId": "B",
          "sql": "select avg(timeseries_used) as used , avg(timeseries_total) as total from log.grants_info where ts >= $from and ts <= $to interval(30s) fill(null)",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 0.95,
          "visible": true
        }
      ],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Measuring Points Used",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": null,
          "format": "none",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "percentunit",
          "label": null,
          "logBase": 1,
          "max": "1",
          "min": "0",
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "alert": {
        "alertRuleTags": {},
        "conditions": [
          {
            "evaluator": {
              "params": [
                86400
              ],
              "type": "lt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "A",
                "1m",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "min"
            },
            "type": "query"
          }
        ],
        "executionErrorState": "keep_state",
        "for": "5m",
        "frequency": "1m",
        "handler": 1,
        "message": "授权即将过期",
        "name": "Grants Expire Time",
        "noDataState": "keep_state",
        "notifications": [
          {
            "uid": "tdinsight-builtin-sms"
          }
        ]
      },
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 6,
        "y": 18
      },
      "hiddenSeries": false,
      "id": 105,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.10",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "percent",
          "yaxis": 2
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select last(expire_time) as expire_time from log.grants_info where ts >= $from and ts <= $to interval(30s) fill(null)",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "lt",
          "value": 86400,
          "visible": true
        }
      ],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Grants Expire Time",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": null,
          "format": "s",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "percentunit",
          "label": null,
          "logBase": 1,
          "max": "1",
          "min": "0",
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "alert": {
        "alertRuleTags": {},
        "conditions": [
          {
            "evaluator": {
              "params": [
                10
              ],
              "type": "gt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "A",
                "1m",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "avg"
            },
            "type": "query"
          }
        ],
        "executionErrorState": "keep_state",
        "for": "5m",
        "frequency": "1m",
        "handler": 1,
        "message": "错误率高",
        "name": "Error Rate",
        "noDataState": "keep_state",
        "notifications": [
          {
            "uid": "tdinsight-builtin-sms"
          }
        ]
      },
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_TDENGINE}",
      "description": "错误率（每秒错误数）",
      "fieldConfig": {
        "defaults": {
          "unit": "cps"
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 12,
        "y": 18
      },
      "hiddenSeries": false,
      "id": 106,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.10",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "percent",
          "yaxis": 2
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select derivative(errors, 1s, 1) as errors from (select sum(errors) as errors from log.dnodes_info where ts >= $from and ts <= $to interval(1s))",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 10,
          "visible": true
        }
      ],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Error Rate",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": null,
          "format": "cps",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "percentunit",
          "label": null,
          "logBase": 1,
          "max": "1",
          "min": "0",
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": null,
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "name"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": null
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 18,
        "y": 18
      },
      "id": 29,
      "options": {
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "7.5.10",
      "repeatDirection": "h",
      "targets": [
        {
          "alias": "dnodes",
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "show variables",
          "target": "select metric",
          "timeshift": {
            "period": null
          },
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Variables",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "value",
                "name"
              ]
            }
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "regex",
                  "options": {
                    "value": ".*"
                  }
                },
                "fieldName": "name"
              }
            ],
            "match": "all",
            "type": "include"
          }
        }
      ],
      "type": "table"
    },
    {
      "collapsed": false,
      "datasource": "${DS_TDENGINE}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 24
      },
      "id": 24,
      "panels": [],
      "repeat": null,
      "title": "DNodes Overview",
      "type": "row"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "center",
            "displayMode": "auto",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "status"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 62
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "vnodes"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 63
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "role"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 58
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "cores"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 56
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "end_point"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 173
              },
              {
                "id": "links",
                "value": [
                  {
                    "targetBlank": false,
                    "title": "Show DNode",
                    "url": "/d/tdinsight/tdinsight?&${__url_time_range}&var-fqdn=${__data.fields.end_point}&${database:queryparam}&${version:queryparam}&${firstEp:queryparam}"
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "id"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 49
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 0,
        "y": 25
      },
      "id": 36,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": false,
            "displayName": "cores"
          }
        ]
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Table",
          "queryType": "SQL",
          "refId": "A",
          "sql": "show dnodes",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "DNodes Status",
      "transformations": [
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "field": "id"
              }
            ]
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 4,
        "x": 12,
        "y": 25
      },
      "id": 90,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "7.5.10",
      "repeat": null,
      "targets": [
        {
          "alias": "",
          "colNameFormatStr": "{{groupValue}}",
          "colNameToGroup": "dnode_ep",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select last(uptime) from log.dnodes_info where ts >= $from and ts <= $to group by dnode_ep",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "DNodes Lifetime",
      "type": "stat"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {
          "unit": "short"
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 4,
        "x": 16,
        "y": 25
      },
      "hiddenSeries": false,
      "id": 88,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.10",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select avg(dnodes_total) as total, avg(dnodes_alive) as alive from log.cluster_info where ts >= $from and ts <= $to interval($interval) fill(null)",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "DNodes Number",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 4,
        "x": 20,
        "y": 25
      },
      "id": 40,
      "options": {
        "displayLabels": [],
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "values": [
            "value"
          ]
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": false
        },
        "text": {
          "titleSize": 6
        }
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Table",
          "queryType": "SQL",
          "refId": "A",
          "sql": "show dnodes",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "title": "Offline Reasons",
      "transformations": [
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "regex",
                  "options": {
                    "value": "ready"
                  }
                },
                "fieldName": "status"
              }
            ],
            "match": "all",
            "type": "exclude"
          }
        },
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "offline reason",
                "end_point"
              ]
            }
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Time": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "end_point": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "offline reason": {
                "aggregations": [],
                "operation": "groupby"
              }
            }
          }
        }
      ],
      "type": "piechart"
    },
    {
      "collapsed": false,
      "datasource": "${DS_TDENGINE}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 31
      },
      "id": 22,
      "panels": [],
      "title": "MNodes Overview",
      "type": "row"
    },
    {
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "center",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "end_point"
            },
            "properties": [
              {
                "id": "links",
                "value": [
                  {
                    "targetBlank": false,
                    "title": "Link to DNode",
                    "url": "d/tdinsight/tdinsight?&${__url_time_range}&var-fqdn=${__data.fields.end_point}&${database:queryparam}&${version:queryparam}&${firstEp:queryparam}"
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "id"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 86
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "role"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 96
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 0,
        "y": 32
      },
      "id": 38,
      "options": {
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "7.5.10",
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Table",
          "queryType": "SQL",
          "refId": "A",
          "sql": "show mnodes;",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "title": "MNodes Status",
      "type": "table"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_TDENGINE}",
      "fieldConfig": {
        "defaults": {
          "unit": "short"
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 12,
        "y": 32
      },
      "hiddenSeries": false,
      "id": 89,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.10",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "colNameFormatStr": "",
          "colNameToGroup": "",
          "formatType": "Time series",
          "queryType": "SQL",
          "refId": "A",
          "sql": "select avg(mnodes_total) as total, avg(mnodes_alive) as alive from log.cluster_info where ts >= $from and ts <= $to interval($interval) fill(null)",
          "target": "select metric",
          "type": "timeserie"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "MNodes Number",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "collapsed": true,
      "datasource": "${DS_TDENGINE}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 37
      },
      "id": 108,
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_TDENGINE}",
          "fieldConfig": {
            "defaults": {
              "unit": "cps"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 47
          },
          "hiddenSeries": false,
          "id": 112,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sideWidth": 600,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.5.10",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "colNameFormatStr": "",
              "colNameToGroup": "dnode_ep",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select avg(req_insert_rate) as insert_rate, avg(req_insert_batch_rate) as batch_rate from log.dnodes_info where ts >= $from and ts <= $to interval($interval) fill(null) group by dnode_ep"
            },
            {
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "B",
              "sql": "select avg(insert_rate) as cluster_insert_rate, avg(batch_rate) as cluster_batch_rate from (select sum(req_insert_rate) as insert_rate, sum(req_insert_batch_rate) as batch_rate from log.dnodes_info where ts >= $from and ts <= $to interval(1s)) where ts >= $from and ts <= $to interval($interval) fill(null)"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Requests Rate (Inserts per Second)",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "cps",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_TDENGINE}",
          "fieldConfig": {
            "defaults": {},
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 24,
            "x": 0,
            "y": 56
          },
          "hiddenSeries": false,
          "id": 114,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sideWidth": 600,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.5.10",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [
            {
              "alias": "/rate/",
              "yaxis": 2
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "colNameFormatStr": "",
              "colNameToGroup": "dnode_ep",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select sum(req_select) as req_select from log.dnodes_info where ts >= $from and ts <= $to interval($interval) fill(null) group by dnode_ep"
            },
            {
              "colNameFormatStr": "",
              "colNameToGroup": "dnode_ep",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "B",
              "sql": "select sum(req_select) as total from log.dnodes_info where ts >= $from and ts <= $to interval($interval) fill(null)"
            },
            {
              "colNameFormatStr": "",
              "colNameToGroup": "dnode_ep",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "C",
              "sql": "select avg(req_select_rate) as req_select_rate from log.dnodes_info where ts >= $from and ts <= $to interval($interval) fill(null) group by dnode_ep"
            },
            {
              "colNameFormatStr": "",
              "colNameToGroup": "dnode_ep",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "D",
              "sql": "select avg(req_select_rate) as req_select_rate from (select sum(req_select_rate) as req_select_rate from log.dnodes_info where ts >= $from and ts <= $to interval(1s)) where ts >= $from and ts <= $to interval($interval) fill(null)"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Requests (Selects)",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "cps",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_TDENGINE}",
          "fieldConfig": {
            "defaults": {},
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 24,
            "x": 0,
            "y": 64
          },
          "hiddenSeries": false,
          "id": 111,
          "interval": null,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sideWidth": 600,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.5.10",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [
            {
              "alias": "/.*rate.*/",
              "dashes": true,
              "fill": 4,
              "spaceLength": 1,
              "yaxis": 2
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "colNameFormatStr": "",
              "colNameToGroup": "dnode_ep",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select sum(req_http) as req_http from log.dnodes_info where ts >= $from and ts <= $to interval($interval) fill(null) group by dnode_ep"
            },
            {
              "colNameFormatStr": "",
              "colNameToGroup": "dnode_ep",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "B",
              "sql": "select sum(req_http) as req_http from log.dnodes_info where ts >= $from and ts <= $to interval($interval) fill(null)"
            },
            {
              "colNameFormatStr": "",
              "colNameToGroup": "dnode_ep",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "C",
              "sql": "select avg(req_http_rate) as req_http_rate from log.dnodes_info where ts >= $from and ts <= $to interval($interval) fill(null) group by dnode_ep"
            },
            {
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "D",
              "sql": "select avg(req_http_rate) as req_http_rate from (select sum(req_http_rate) as req_http_rate from log.dnodes_info where ts >= $from and ts <= $to interval(1s)) where ts >= $from and ts <= $to interval($interval) fill(null)"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Requests (HTTP)",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "ops",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        }
      ],
      "title": "Requests",
      "type": "row"
    },
    {
      "collapsed": true,
      "datasource": "${DS_TDENGINE}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 38
      },
      "id": 92,
      "panels": [
        {
          "datasource": "${DS_TDENGINE}",
          "description": "超级表的个数",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 3,
            "w": 3,
            "x": 0,
            "y": 73
          },
          "id": 96,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": true
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "7.5.10",
          "repeatDirection": "h",
          "scopedVars": {
            "database": {
              "selected": false,
              "text": "demo",
              "value": "demo"
            }
          },
          "targets": [
            {
              "alias": "dnodes",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "show $database.stables;",
              "target": "select metric",
              "timeshift": {
                "period": null
              },
              "type": "timeserie"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "STables",
          "transformations": [
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "tables"
                  ]
                }
              }
            },
            {
              "id": "reduce",
              "options": {
                "includeTimeField": false,
                "mode": "reduceFields",
                "reducers": [
                  "count"
                ]
              }
            }
          ],
          "type": "stat"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_TDENGINE}",
          "fieldConfig": {
            "defaults": {},
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 9,
            "x": 3,
            "y": 73
          },
          "hiddenSeries": false,
          "id": 94,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.5.10",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "scopedVars": {
            "database": {
              "selected": false,
              "text": "demo",
              "value": "demo"
            }
          },
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "colName": "vgroup_id",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "groupDataByColName": "",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select last(tables_num) as tables_num from (select last(ts) as ts, sum(tables_num) as tables_num from log.vgroups_info where ts > $from and ts <= $to and database_name = '$database' group by ts) where ts >= $from and ts <= $to interval($interval) fill(null)"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Tables",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_TDENGINE}",
          "fieldConfig": {
            "defaults": {},
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 12,
            "y": 73
          },
          "hiddenSeries": false,
          "id": 95,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.5.10",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "scopedVars": {
            "database": {
              "selected": false,
              "text": "demo",
              "value": "demo"
            }
          },
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "colName": "vgroup_id",
              "colNameFormatStr": "vgoup{{groupValue}}",
              "colNameToGroup": "vgroup_id",
              "formatType": "Time series",
              "groupDataByColName": "",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select max(tables_num) as tables_num from log.vgroups_info where ts > $from and ts <= $to and database_name = '$database' interval($interval) fill(null) group by vgroup_id"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Tables Number Foreach VGroups",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "datasource": "${DS_TDENGINE}",
          "description": "所有普通表的个数（包括超级表的子表）",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 3,
            "w": 3,
            "x": 0,
            "y": 76
          },
          "id": 98,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": true
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "7.5.10",
          "repeatDirection": "h",
          "scopedVars": {
            "database": {
              "selected": false,
              "text": "demo",
              "value": "demo"
            }
          },
          "targets": [
            {
              "alias": "dnodes",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select last(tables_num) from (select last(ts) as ts, sum(tables_num) as tables_num from log.vgroups_info where ts > $from and ts <= $to and database_name = '$database' group by ts)",
              "target": "select metric",
              "timeshift": {
                "period": null
              },
              "type": "timeserie"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Total Tables",
          "transformations": [],
          "type": "stat"
        },
        {
          "datasource": "${DS_TDENGINE}",
          "description": "超级表的所有子表个数",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 3,
            "w": 3,
            "x": 0,
            "y": 79
          },
          "id": 97,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": true
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "7.5.10",
          "repeatDirection": "h",
          "scopedVars": {
            "database": {
              "selected": false,
              "text": "demo",
              "value": "demo"
            }
          },
          "targets": [
            {
              "alias": "dnodes",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "show $database.stables;",
              "target": "select metric",
              "timeshift": {
                "period": null
              },
              "type": "timeserie"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Sub Tables",
          "transformations": [
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "tables"
                  ]
                }
              }
            },
            {
              "id": "reduce",
              "options": {
                "includeTimeField": false,
                "mode": "reduceFields",
                "reducers": [
                  "sum"
                ]
              }
            }
          ],
          "type": "stat"
        }
      ],
      "repeat": "database",
      "title": "Database: [ $database ]",
      "type": "row"
    },
    {
      "collapsed": true,
      "datasource": "${DS_TDENGINE}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 41
      },
      "id": 20,
      "panels": [
        {
          "datasource": "${DS_TDENGINE}",
          "description": "启动时长",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "noValue": "Down",
              "thresholds": {
                "mode": "percentage",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "unit": "s"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 4,
            "x": 0,
            "y": 42
          },
          "id": 120,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "last"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "7.5.10",
          "scopedVars": {
            "fqdn": {
              "selected": false,
              "text": "huolinhe-TM1701:6030",
              "value": "huolinhe-TM1701:6030"
            }
          },
          "targets": [
            {
              "alias": "disk_used",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select last(uptime) as uptime from log.dnodes_info where dnode_ep = '$fqdn'",
              "target": "select metric",
              "timeshift": {
                "period": null
              },
              "type": "timeserie"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Uptime",
          "transformations": [
            {
              "id": "reduce",
              "options": {
                "includeTimeField": false,
                "mode": "reduceFields",
                "reducers": [
                  "lastNotNull"
                ]
              }
            }
          ],
          "type": "stat"
        },
        {
          "datasource": "${DS_TDENGINE}",
          "description": "是否有MNode",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [
                {
                  "from": "",
                  "id": 1,
                  "text": "Yes",
                  "to": "",
                  "type": 1,
                  "value": "1"
                },
                {
                  "from": "",
                  "id": 2,
                  "text": "No",
                  "to": "",
                  "type": 1,
                  "value": "0"
                }
              ],
              "thresholds": {
                "mode": "percentage",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "unit": "none"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 2,
            "x": 4,
            "y": 42
          },
          "id": 121,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "last"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "7.5.10",
          "scopedVars": {
            "fqdn": {
              "selected": false,
              "text": "huolinhe-TM1701:6030",
              "value": "huolinhe-TM1701:6030"
            }
          },
          "targets": [
            {
              "alias": "",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select last(has_mnode) as has_mnode from log.dnodes_info where dnode_ep = '$fqdn' and ts >= $from and ts <= $to interval($interval)",
              "target": "select metric",
              "timeshift": {
                "period": null
              },
              "type": "timeserie"
            },
            {
              "alias": "if_has",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "expression": "Number(A)",
              "formatType": "Time series",
              "hide": false,
              "queryType": "Arithmetic",
              "refId": "B"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Has MNode?",
          "transformations": [
            {
              "id": "filterFieldsByName",
              "options": {
                "include": {
                  "names": [
                    "if_has"
                  ]
                }
              }
            }
          ],
          "type": "stat"
        },
        {
          "datasource": "${DS_TDENGINE}",
          "description": "CPU 核数",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "noValue": "Down",
              "thresholds": {
                "mode": "percentage",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "unit": "none"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 2,
            "x": 6,
            "y": 42
          },
          "id": 122,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "7.5.10",
          "scopedVars": {
            "fqdn": {
              "selected": false,
              "text": "huolinhe-TM1701:6030",
              "value": "huolinhe-TM1701:6030"
            }
          },
          "targets": [
            {
              "alias": "",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select last(cpu_cores) as uptime from log.dnodes_info where dnode_ep = '$fqdn' interval ($interval)",
              "target": "select metric",
              "timeshift": {
                "period": null
              },
              "type": "timeserie"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "CPU Cores",
          "transformations": [],
          "type": "stat"
        },
        {
          "datasource": "${DS_TDENGINE}",
          "description": "VNodes 数量",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "percentage",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "unit": "none"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 2,
            "x": 8,
            "y": 42
          },
          "id": 123,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "7.5.10",
          "scopedVars": {
            "fqdn": {
              "selected": false,
              "text": "huolinhe-TM1701:6030",
              "value": "huolinhe-TM1701:6030"
            }
          },
          "targets": [
            {
              "alias": "",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select last(vnodes_num) as vnodes_num from log.dnodes_info where dnode_ep = '$fqdn' and ts >= $from and ts <= $to interval($interval) fill(null)",
              "target": "select metric",
              "timeshift": {
                "period": null
              },
              "type": "timeserie"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "VNodes Number",
          "transformations": [],
          "type": "stat"
        },
        {
          "datasource": "${DS_TDENGINE}",
          "description": "Master VNodes 数量",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "percentage",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "unit": "none"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 2,
            "x": 10,
            "y": 42
          },
          "id": 124,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "7.5.10",
          "scopedVars": {
            "fqdn": {
              "selected": false,
              "text": "huolinhe-TM1701:6030",
              "value": "huolinhe-TM1701:6030"
            }
          },
          "targets": [
            {
              "alias": "",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select last(masters) as masters from log.dnodes_info where dnode_ep = '$fqdn' and ts >= $from and ts <= $to interval($interval) fill(null)",
              "target": "select metric",
              "timeshift": {
                "period": null
              },
              "type": "timeserie"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "VNodes Masters",
          "transformations": [],
          "type": "stat"
        },
        {
          "datasource": "${DS_TDENGINE}",
          "description": "当前 taosd 线程 CPU 使用率",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "continuous-GrYlRd"
              },
              "mappings": [],
              "min": 0,
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "#EAB839",
                    "value": 0.5
                  },
                  {
                    "color": "red",
                    "value": 0.8
                  }
                ]
              },
              "unit": "percent"
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "last(cpu_taosd)"
                },
                "properties": [
                  {
                    "id": "thresholds",
                    "value": {
                      "mode": "absolute",
                      "steps": [
                        {
                          "color": "green",
                          "value": null
                        },
                        {
                          "color": "red",
                          "value": 80
                        }
                      ]
                    }
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 6,
            "w": 4,
            "x": 12,
            "y": 42
          },
          "id": 45,
          "options": {
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "mean"
              ],
              "fields": "",
              "values": false
            },
            "showThresholdLabels": true,
            "showThresholdMarkers": true,
            "text": {}
          },
          "pluginVersion": "7.5.10",
          "scopedVars": {
            "fqdn": {
              "selected": false,
              "text": "huolinhe-TM1701:6030",
              "value": "huolinhe-TM1701:6030"
            }
          },
          "targets": [
            {
              "alias": "mem_taosd",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Table",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select last(cpu_engine) from log.dnodes_info where dnode_ep = '$fqdn' and ts >= $from and ts <= $to",
              "target": "select metric",
              "type": "timeserie"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Current CPU Usage of taosd",
          "type": "gauge"
        },
        {
          "datasource": "${DS_TDENGINE}",
          "description": "当前 taosd 线程 内存 使用率",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "continuous-GrYlRd"
              },
              "mappings": [],
              "min": 0,
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "unit": "decmbytes"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 4,
            "x": 16,
            "y": 42
          },
          "id": 66,
          "options": {
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "mean"
              ],
              "fields": "/^taosd$/",
              "values": false
            },
            "showThresholdLabels": true,
            "showThresholdMarkers": true,
            "text": {}
          },
          "pluginVersion": "7.5.10",
          "scopedVars": {
            "fqdn": {
              "selected": false,
              "text": "huolinhe-TM1701:6030",
              "value": "huolinhe-TM1701:6030"
            }
          },
          "targets": [
            {
              "alias": "memory",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select last(mem_engine) as taosd, last(mem_total) as total from log.dnodes_info where dnode_ep = '$fqdn' and ts >= $from and ts <= $to",
              "target": "select metric",
              "type": "timeserie"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Current Memory Usage of taosd",
          "type": "gauge"
        },
        {
          "datasource": "${DS_TDENGINE}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "max": 1,
              "min": 0,
              "thresholds": {
                "mode": "percentage",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "#EAB839",
                    "value": 75
                  },
                  {
                    "color": "red",
                    "value": 80
                  },
                  {
                    "color": "dark-red",
                    "value": 95
                  }
                ]
              },
              "unit": "percentunit"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 4,
            "x": 20,
            "y": 42
          },
          "id": 51,
          "options": {
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "last"
              ],
              "fields": "/^percent$/",
              "values": false
            },
            "showThresholdLabels": true,
            "showThresholdMarkers": true,
            "text": {}
          },
          "pluginVersion": "7.5.10",
          "scopedVars": {
            "fqdn": {
              "selected": false,
              "text": "huolinhe-TM1701:6030",
              "value": "huolinhe-TM1701:6030"
            }
          },
          "targets": [
            {
              "alias": "disk_used",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select last(disk_used) as used, last(disk_total) as total, last(disk_used) / last(disk_total) as percent from log.dnodes_info where dnode_ep = '$fqdn' and ts >= $from and ts <= $to",
              "target": "select metric",
              "timeshift": {
                "period": null
              },
              "type": "timeserie"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Disk Used",
          "transformations": [],
          "type": "gauge"
        },
        {
          "aliasColors": {},
          "bars": false,
          "cacheTimeout": null,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_TDENGINE}",
          "description": "CPU 资源占用情况。",
          "fieldConfig": {
            "defaults": {
              "links": []
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 11,
            "w": 12,
            "x": 0,
            "y": 48
          },
          "hiddenSeries": false,
          "hideTimeOverride": true,
          "id": 2,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "hideZero": false,
            "max": true,
            "min": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.5.10",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "scopedVars": {
            "fqdn": {
              "selected": false,
              "text": "huolinhe-TM1701:6030",
              "value": "huolinhe-TM1701:6030"
            }
          },
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "A",
              "sql": "select avg(cpu_engine) as taosd, avg(cpu_system) as system from log.dnodes_info where dnode_ep='$fqdn' and ts >= $from and ts <= $to interval($interval) fill(null)",
              "target": "select metric",
              "type": "timeserie"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "CPU Usage",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "decimals": null,
              "format": "percent",
              "label": "使用占比",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "cacheTimeout": null,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_TDENGINE}",
          "description": "内存资源占用情况",
          "fieldConfig": {
            "defaults": {
              "links": []
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 11,
            "w": 12,
            "x": 12,
            "y": 48
          },
          "hiddenSeries": false,
          "hideTimeOverride": true,
          "id": 42,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.5.10",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "scopedVars": {
            "fqdn": {
              "selected": false,
              "text": "huolinhe-TM1701:6030",
              "value": "huolinhe-TM1701:6030"
            }
          },
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "A",
              "sql": "select avg(mem_engine) as taosd, avg(mem_system) as system, avg(mem_total) as total from log.dnodes_info where dnode_ep='$fqdn' and ts >= $from and ts <= $to interval($interval) fill(null)",
              "target": "select metric",
              "type": "timeserie"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "RAM Usage",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "decimals": null,
              "format": "decmbytes",
              "label": "使用占比",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_TDENGINE}",
          "fieldConfig": {
            "defaults": {},
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 10,
            "w": 12,
            "x": 0,
            "y": 59
          },
          "hiddenSeries": false,
          "id": 117,
          "legend": {
            "alignAsTable": true,
            "avg": false,
            "current": true,
            "hideEmpty": false,
            "hideZero": true,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "sideWidth": 400,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.5.10",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "scopedVars": {
            "fqdn": {
              "selected": false,
              "text": "huolinhe-TM1701:6030",
              "value": "huolinhe-TM1701:6030"
            }
          },
          "seriesOverrides": [
            {
              "alias": "/percent/",
              "yaxis": 2
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "A",
              "sql": "select avg(datadir_l0_used) as level0_used, avg(datadir_l0_total) as level0_total, avg(datadir_l1_used) as level1_used, avg(datadir_l1_total) as level1_total, avg(datadir_l2_used) as level2_used, avg(datadir_l2_total) as level2_total from log.disks_info where dnode_ep = '$fqdn' and ts >= $from and ts <= $to interval($interval) fill(null)",
              "target": "select metric",
              "timeshift": {
                "period": null
              },
              "type": "timeserie"
            },
            {
              "alias": "",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "D",
              "sql": "select avg(datadir_l0_used)/avg(datadir_l0_total) as level0_percent, avg(datadir_l1_used)/avg(datadir_l1_total) as level1_percent , avg(datadir_l2_used)/avg(datadir_l2_total) as level2_percent from log.disks_info where dnode_ep = '$fqdn' and ts >= $from and ts <= $to interval($interval) fill(null)",
              "target": "select metric",
              "timeshift": {
                "period": null
              },
              "type": "timeserie"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Disk Used",
          "tooltip": {
            "shared": false,
            "sort": 0,
            "value_type": "individual"
          },
          "transformations": [],
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "gbytes",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "percentunit",
              "label": "Disk Used",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_TDENGINE}",
          "fieldConfig": {
            "defaults": {},
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 10,
            "w": 12,
            "x": 12,
            "y": 59
          },
          "hiddenSeries": false,
          "id": 64,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "sideWidth": 400,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.5.10",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "scopedVars": {
            "fqdn": {
              "selected": false,
              "text": "huolinhe-TM1701:6030",
              "value": "huolinhe-TM1701:6030"
            }
          },
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "level0",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "A",
              "sql": "select derivative(value, 1m, 0) from (select avg(datadir_l0_used) * 1024 as value from log.disks_info where dnode_ep = '$fqdn' and ts >= $from and ts <= $to interval($interval) fill(null))",
              "target": "select metric",
              "timeshift": {
                "period": null
              },
              "type": "timeserie"
            },
            {
              "alias": "level1",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "B",
              "sql": "select derivative(value, 1m, 0) from (select avg(datadir_l1_used) * 1024 as value from log.disks_info where dnode_ep = '$fqdn' and ts >= $from and ts <= $to interval($interval) fill(null))",
              "target": "select metric",
              "timeshift": {
                "period": null
              },
              "type": "timeserie"
            },
            {
              "alias": "level2",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "C",
              "sql": "select derivative(value, 1m, 0) from (select avg(datadir_l2_used) * 1024 as value from log.disks_info where dnode_ep = '$fqdn' and ts >= $from and ts <= $to interval($interval) fill(null))",
              "target": "select metric",
              "timeshift": {
                "period": null
              },
              "type": "timeserie"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Disk Used Increasing Rate per Minute",
          "tooltip": {
            "shared": false,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "MBs",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "percentunit",
              "label": "Disk Used",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "cacheTimeout": null,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_TDENGINE}",
          "description": "io",
          "fieldConfig": {
            "defaults": {
              "links": []
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 12,
            "w": 12,
            "x": 0,
            "y": 69
          },
          "hiddenSeries": false,
          "hideTimeOverride": true,
          "id": 119,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.5.10",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "scopedVars": {
            "fqdn": {
              "selected": false,
              "text": "huolinhe-TM1701:6030",
              "value": "huolinhe-TM1701:6030"
            }
          },
          "seriesOverrides": [
            {
              "alias": "/last/",
              "dashLength": 5,
              "dashes": true,
              "spaceLength": 5
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "A",
              "sql": "select avg(io_read_disk) as io_read_taosd, avg(io_write_disk) as io_write_taosd from log.dnodes_info where dnode_ep = '$fqdn' and ts >= $from and ts <= $to interval($interval) fill(null)",
              "target": "select metric",
              "type": "timeserie"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Disk IO",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "decimals": null,
              "format": "MBs",
              "label": "IO Rate",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "cacheTimeout": null,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_TDENGINE}",
          "description": "io",
          "fieldConfig": {
            "defaults": {
              "links": [],
              "unit": "Mbits"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 12,
            "w": 12,
            "x": 12,
            "y": 69
          },
          "hiddenSeries": false,
          "hideTimeOverride": true,
          "id": 118,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.5.10",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "scopedVars": {
            "fqdn": {
              "selected": false,
              "text": "huolinhe-TM1701:6030",
              "value": "huolinhe-TM1701:6030"
            }
          },
          "seriesOverrides": [
            {
              "alias": "/in/",
              "transform": "negative-Y"
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "A",
              "sql": "select avg(net_in) as net_in, avg(net_out) as net_out from log.dnodes_info where dnode_ep = '$fqdn' and ts >= $from and ts <= $to interval($interval) fill(null)",
              "target": "select metric",
              "type": "timeserie"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Net",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "decimals": null,
              "format": "Mbits",
              "label": "IO Rate",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        }
      ],
      "repeat": "fqdn",
      "title": "DNode Usage [ $fqdn ]",
      "type": "row"
    },
    {
      "collapsed": true,
      "datasource": "${DS_TDENGINE}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 42
      },
      "id": 63,
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_TDENGINE}",
          "fieldConfig": {
            "defaults": {
              "displayName": "Logins Per Minute",
              "unit": "cpm"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 8
          },
          "hiddenSeries": false,
          "id": 61,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.5.10",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [
            {
              "alias": "logins",
              "nullPointMode": "null as zero"
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "logins",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select count(*) from log.logs where ts >= $from and ts <= $to interval (1m)",
              "target": "select metric",
              "type": "timeserie"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Login Counts per Minute",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "cpm",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        }
      ],
      "title": "Login History",
      "type": "row"
    },
    {
      "id": 64,
      "collapsed": true,
      "datasource": "${DS_TDENGINE}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 43
      },
      "panels": [
        {
          "id": 1,
          "gridPos": {
            "h": 5,
            "w": 12,
            "x": 0,
            "y": 0
          },
          "type": "timeseries",
          "title": "http_request",
          "description": "http请求统计",
          "fieldConfig": {
            "defaults": {
              "custom": {
                "drawStyle": "line",
                "lineInterpolation": "linear",
                "barAlignment": 0,
                "lineWidth": 1,
                "fillOpacity": 0,
                "gradientMode": "none",
                "spanNulls": false,
                "showPoints": "auto",
                "pointSize": 5,
                "stacking": {
                  "mode": "none",
                  "group": "A"
                },
                "axisPlacement": "auto",
                "axisLabel": "",
                "scaleDistribution": {
                  "type": "linear"
                },
                "hideFrom": {
                  "tooltip": false,
                  "viz": false,
                  "legend": false
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "color": {
                "mode": "palette-classic"
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "mappings": []
            },
            "overrides": []
          },
          "options": {
            "tooltip": {
              "mode": "single"
            },
            "legend": {
              "displayMode": "list",
              "placement": "bottom",
              "calcs": []
            }
          },
          "targets": [
            {
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "datasource": "${DS_TDENGINE}",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select avg(count) as request_total from log.taosadapter_restful_http_total where ts >= $from and ts <= $to interval($interval)"
            },
            {
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "datasource": "${DS_TDENGINE}",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "B",
              "sql": "select avg(count) as request_fail from log.taosadapter_restful_http_fail where  ts >= $from and ts <= $to interval($interval)"
            },
            {
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "datasource": "${DS_TDENGINE}",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "C",
              "sql": "select avg(count) as request_in_flight from log.taosadapter_restful_http_request_in_flight where ts >= $from and ts <= $to interval($interval)"
            }
          ],
          "datasource": "${DS_TDENGINE}"
        },
        {
          "id": 7,
          "gridPos": {
            "h": 5,
            "w": 8,
            "x": 12,
            "y": 0
          },
          "type": "table",
          "title": "top 3 request endpoint",
          "transformations": [
            {
              "id": "sortBy",
              "options": {
                "fields": {},
                "sort": [
                  {
                    "field": "id"
                  }
                ]
              }
            }
          ],
          "pluginVersion": "7.5.10",
          "fieldConfig": {
            "defaults": {
              "custom": {
                "align": "center",
                "displayMode": "auto",
                "filterable": false
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "mappings": [],
              "color": {
                "mode": "thresholds"
              }
            },
            "overrides": []
          },
          "options": {
            "showHeader": true,
            "footer": {
              "show": false,
              "reducer": [
                "sum"
              ],
              "fields": ""
            },
            "sortBy": []
          },
          "targets": [
            {
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Table",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select * from (select avg(count) as count from log.taosadapter_restful_http_total where  ts >= $from and ts <= $to group by endpoint) order by count desc limit 3",
              "target": "select metric",
              "type": "timeserie",
              "datasource": "${DS_TDENGINE}"
            }
          ],
          "datasource": "${DS_TDENGINE}"
        },
        {
          "id": 3,
          "gridPos": {
            "h": 5,
            "w": 4,
            "x": 20,
            "y": 0
          },
          "type": "gauge",
          "title": "Memory Used",
          "transformations": [],
          "datasource": "${DS_TDENGINE}",
          "pluginVersion": "7.5.10",
          "fieldConfig": {
            "defaults": {
              "thresholds": {
                "mode": "percentage",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  },
                  {
                    "color": "dark-red",
                    "value": 90
                  }
                ]
              },
              "mappings": [],
              "color": {
                "mode": "thresholds"
              },
              "max": 100,
              "min": 0,
              "unit": "percent"
            },
            "overrides": []
          },
          "options": {
            "reduceOptions": {
              "values": false,
              "calcs": [
                "last"
              ],
              "fields": "/^mem_percent$/"
            },
            "orientation": "auto",
            "showThresholdLabels": true,
            "showThresholdMarkers": true,
            "text": {}
          },
          "targets": [
            {
              "alias": "disk_used",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select last(mem_percent) as mem_percent from log.taosadapter_system where ts >= $from and ts <= $to",
              "target": "select metric",
              "timeshift": {},
              "type": "timeserie"
            }
          ],
          "description": ""
        },
        {
          "id": 4,
          "gridPos": {
            "h": 5,
            "w": 12,
            "x": 0,
            "y": 5
          },
          "type": "graph",
          "title": "latency_quantile(ms)",
          "thresholds": [],
          "pluginVersion": "7.5.10",
          "description": "延迟分位数",
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "aliasColors": {},
          "dashLength": 10,
          "fill": 1,
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "pointradius": 2,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "targets": [
            {
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "datasource": "${DS_TDENGINE}",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "B",
              "sql": "select avg(quantile_1) as quantile_1 from log.taosadapter_restful_http_request_latency where ts >= $from and ts <= $to and request_uri != '/rest/ws' interval($interval)"
            },
            {
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "datasource": "${DS_TDENGINE}",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "C",
              "sql": "select avg(quantile_2) as quantile_2 from log.taosadapter_restful_http_request_latency where ts >= $from and ts <= $to and request_uri != '/rest/ws' interval($interval)"
            },
            {
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "datasource": "${DS_TDENGINE}",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "D",
              "sql": "select avg(quantile_5) as quantile_5 from log.taosadapter_restful_http_request_latency where ts >= $from and ts <= $to and request_uri != '/rest/ws' interval($interval)"
            },
            {
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "datasource": "${DS_TDENGINE}",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "E",
              "sql": "select avg(quantile_9) as quantile_9 from log.taosadapter_restful_http_request_latency where ts >= $from and ts <= $to and request_uri != '/rest/ws' interval($interval)"
            },
            {
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "datasource": "${DS_TDENGINE}",
              "formatType": "Time series",
              "hide": false,
              "queryType": "SQL",
              "refId": "A",
              "sql": "select avg(quantile_99) as quantile_99 from log.taosadapter_restful_http_request_latency where ts >= $from and ts <= $to and request_uri != '/rest/ws' interval($interval)"
            }
          ],
          "timeRegions": [],
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": [],
            "name": null,
            "buckets": null
          },
          "yaxes": [
            {
              "format": "short",
              "logBase": 1,
              "show": true
            },
            {
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          },
          "bars": false,
          "dashes": false,
          "fillGradient": 0,
          "hiddenSeries": false,
          "percentage": false,
          "points": false,
          "stack": false,
          "steppedLine": false,
          "timeFrom": null,
          "timeShift": null,
          "datasource": "${DS_TDENGINE}"
        },
        {
          "id": 5,
          "gridPos": {
            "h": 5,
            "w": 8,
            "x": 12,
            "y": 5
          },
          "type": "table",
          "title": "top 3 failed request endpoint",
          "transformations": [
            {
              "id": "sortBy",
              "options": {
                "fields": {},
                "sort": [
                  {
                    "field": "id"
                  }
                ]
              }
            }
          ],
          "pluginVersion": "7.5.10",
          "fieldConfig": {
            "defaults": {
              "custom": {
                "align": "center",
                "displayMode": "auto",
                "filterable": false
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "mappings": [],
              "color": {
                "mode": "thresholds"
              }
            },
            "overrides": []
          },
          "options": {
            "showHeader": true,
            "footer": {
              "show": false,
              "reducer": [
                "sum"
              ],
              "fields": ""
            },
            "sortBy": []
          },
          "targets": [
            {
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Table",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select * from (select avg(count) as count from log.taosadapter_restful_http_fail where ts >= $from and ts <= $to group by endpoint) order by count desc limit 3",
              "target": "select metric",
              "type": "timeserie",
              "datasource": "${DS_TDENGINE}"
            }
          ],
          "datasource": "${DS_TDENGINE}"
        },
        {
          "id": 6,
          "gridPos": {
            "h": 5,
            "w": 4,
            "x": 20,
            "y": 5
          },
          "type": "gauge",
          "title": "CPU Used",
          "transformations": [],
          "pluginVersion": "7.5.10",
          "description": "CPU 使用率",
          "fieldConfig": {
            "defaults": {
              "thresholds": {
                "mode": "percentage",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "#EAB839",
                    "value": 60
                  },
                  {
                    "color": "red",
                    "value": 90
                  }
                ]
              },
              "mappings": [],
              "color": {
                "mode": "thresholds"
              },
              "max": 100,
              "min": 0,
              "unit": "percent"
            },
            "overrides": []
          },
          "options": {
            "reduceOptions": {
              "values": false,
              "calcs": [
                "last"
              ],
              "fields": "/^cpu_percent$/"
            },
            "orientation": "auto",
            "showThresholdLabels": true,
            "showThresholdMarkers": true,
            "text": {}
          },
          "targets": [
            {
              "alias": "disk_used",
              "colNameFormatStr": "",
              "colNameToGroup": "",
              "formatType": "Time series",
              "queryType": "SQL",
              "refId": "A",
              "sql": "select last(cpu_percent) as cpu_percent from log.taosadapter_system where ts >= $from and ts <= $to",
              "target": "select metric",
              "timeshift": {},
              "type": "timeserie",
              "datasource": "${DS_TDENGINE}"
            }
          ],
          "datasource": "${DS_TDENGINE}"
        }
      ],
      "title": "TaosAdapter",
      "type": "row"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 27,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_TDENGINE}",
        "definition": "select fqdn from log.dn",
        "description": "TDengine Nodes FQDN (Hostname)",
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "fqdn",
        "options": [],
        "query": "select fqdn from log.dn",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_TDENGINE}",
        "definition": "show databases",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Database",
        "multi": true,
        "name": "database",
        "options": [],
        "query": "show databases",
        "refresh": 1,
        "regex": "/([^,]+),/",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_TDENGINE}",
        "definition": "select last(version) from log.cluster_info",
        "description": null,
        "error": null,
        "hide": 2,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "version",
        "options": [],
        "query": "select last(version) from log.cluster_info",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_TDENGINE}",
        "definition": "select last(first_ep) from log.cluster_info",
        "description": null,
        "error": null,
        "hide": 2,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "firstEp",
        "options": [],
        "query": "select last(first_ep) from log.cluster_info",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "auto": true,
        "auto_count": 100,
        "auto_min": "10s",
        "current": {
          "selected": false,
          "text": "auto",
          "value": "$__auto_interval_interval"
        },
        "description": null,
        "error": null,
        "hide": 0,
        "label": "Interval",
        "name": "interval",
        "options": [
          {
            "selected": true,
            "text": "auto",
            "value": "$__auto_interval_interval"
          },
          {
            "selected": false,
            "text": "5s",
            "value": "5s"
          },
          {
            "selected": false,
            "text": "10s",
            "value": "10s"
          },
          {
            "selected": false,
            "text": "15s",
            "value": "15s"
          },
          {
            "selected": false,
            "text": "20s",
            "value": "20s"
          },
          {
            "selected": false,
            "text": "30s",
            "value": "30s"
          },
          {
            "selected": false,
            "text": "1m",
            "value": "1m"
          },
          {
            "selected": false,
            "text": "2m",
            "value": "2m"
          },
          {
            "selected": false,
            "text": "5m",
            "value": "5m"
          },
          {
            "selected": false,
            "text": "10m",
            "value": "10m"
          },
          {
            "selected": false,
            "text": "30m",
            "value": "30m"
          },
          {
            "selected": false,
            "text": "1h",
            "value": "1h"
          },
          {
            "selected": false,
            "text": "6h",
            "value": "6h"
          },
          {
            "selected": false,
            "text": "12h",
            "value": "12h"
          },
          {
            "selected": false,
            "text": "1d",
            "value": "1d"
          }
        ],
        "query": "5s,10s,15s,20s,30s,1m,2m,5m,10m,30m,1h,6h,12h,1d",
        "queryValue": "",
        "refresh": 2,
        "skipUrlSync": false,
        "type": "interval"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "TDinsight",
  "uid": "tdinsight",
  "version": 31
}