Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add the miss file of configuration and a monitor file #66

Merged
merged 25 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/.vuepress/sidebar/V0.13.x/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ export const enSidebar = {
prefix: 'Process-Data/',
children: [
{ text: 'UDF (User Defined Function)', link: 'UDF-User-Defined-Function' },
{ text: 'Query Write-back (SELECT INTO)', link: 'Select-Into' },
{ text: 'CQ (Continuous Query)', link: 'Continuous-Query' },
{ text: 'Select Into', link: 'Select-Into' },
{ text: 'Continuous Query', link: 'Continuous-Query' },
{ text: 'Triggers', link: 'Triggers' },
{ text: 'Alerting', link: 'Alerting' },
],
},
{
text: 'Administration Management',
text: 'Administration',
collapsible: true,
prefix: 'Administration-Management/',
children: [
Expand Down
6 changes: 3 additions & 3 deletions src/.vuepress/sidebar/V1.1.x/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export const enSidebar = {
],
},
{
text: 'Administration Management',
text: 'Administration',
collapsible: true,
prefix: 'Administration-Management/',
// children: 'structure',
Expand All @@ -229,7 +229,7 @@ export const enSidebar = {
{ text: 'Log Tool', link: 'Log-Tool' },
{ text: 'JMX Tool', link: 'JMX-Tool' },
{ text: 'MLogParser Tool', link: 'MLogParser-Tool' },
{ text: 'IoTDB Data Directory Overview Tool', link: 'IoTDB-Data-Dir-Overview-Tool' },
{ text: 'Data Directory Overview Tool', link: 'IoTDB-Data-Dir-Overview-Tool' },
{ text: 'TsFile Sketch Tool', link: 'TsFile-Sketch-Tool' },
{ text: 'TsFile Resource Sketch Tool', link: 'TsFile-Resource-Sketch-Tool' },
{ text: 'TsFile Split Tool', link: 'TsFile-Split-Tool' },
Expand All @@ -238,7 +238,7 @@ export const enSidebar = {
],
},
{
text: 'Collaboration of Edge and Cloud',
text: ' Edge - Cloud Collaboration',
collapsible: true,
prefix: 'Edge-Cloud-Collaboration/',
// children: 'structure',
Expand Down
2 changes: 1 addition & 1 deletion src/.vuepress/sidebar/V1.2.x/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const enSidebar = {
],
},
{
text: 'Deployment and Maintenance',
text: 'Deployment & Maintenance',
collapsible: true,
prefix: 'Deployment-and-Maintenance/',
// children: 'structure',
Expand Down
6 changes: 3 additions & 3 deletions src/.vuepress/sidebar_timecho/V0.13.x/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ export const enSidebar = {
prefix: 'Process-Data/',
children: [
{ text: 'UDF (User Defined Function)', link: 'UDF-User-Defined-Function' },
{ text: 'Query Write-back (SELECT INTO)', link: 'Select-Into' },
{ text: 'CQ (Continuous Query)', link: 'Continuous-Query' },
{ text: 'Seletct Into', link: 'Select-Into' },
{ text: 'Continuous Query', link: 'Continuous-Query' },
{ text: 'Triggers', link: 'Triggers' },
{ text: 'Alerting', link: 'Alerting' },
],
},
{
text: 'Administration Management',
text: 'Administration',
collapsible: true,
prefix: 'Administration-Management/',
children: [
Expand Down
8 changes: 4 additions & 4 deletions src/.vuepress/sidebar_timecho/V1.1.x/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const enSidebar = {
{ text: 'Key-Value Pair', link: 'KeyValue-Pair' },
{ text: 'Keywords', link: 'Keywords-And-Reserved-Words' },
{ text: 'Session And TsFile API', link: 'Session-And-TsFile-API' },
{ text: 'Detailed Definitions of Lexical and Grammar', link: 'Detailed-Grammar' },
{ text: 'Lexical and Grammar', link: 'Detailed-Grammar' },
],
},
{
Expand Down Expand Up @@ -211,7 +211,7 @@ export const enSidebar = {
],
},
{
text: 'Administration Management',
text: 'Administration',
collapsible: true,
prefix: 'Administration-Management/',
// children: 'structure',
Expand All @@ -229,7 +229,7 @@ export const enSidebar = {
{ text: 'Log Tool', link: 'Log-Tool' },
{ text: 'JMX Tool', link: 'JMX-Tool' },
{ text: 'MLogParser Tool', link: 'MLogParser-Tool' },
{ text: 'IoTDB Data Directory Overview Tool', link: 'IoTDB-Data-Dir-Overview-Tool' },
{ text: 'Data Directory Overview Tool', link: 'IoTDB-Data-Dir-Overview-Tool' },
{ text: 'TsFile Sketch Tool', link: 'TsFile-Sketch-Tool' },
{ text: 'TsFile Resource Sketch Tool', link: 'TsFile-Resource-Sketch-Tool' },
{ text: 'TsFile Split Tool', link: 'TsFile-Split-Tool' },
Expand All @@ -238,7 +238,7 @@ export const enSidebar = {
],
},
{
text: 'Collaboration of Edge and Cloud',
text: 'Edge - Cloud Collaboration',
collapsible: true,
prefix: 'Edge-Cloud-Collaboration/',
// children: 'structure',
Expand Down
2 changes: 2 additions & 0 deletions src/.vuepress/sidebar_timecho/V1.1.x/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ export const zhSidebar = {
// children: 'structure',
children: [
{ text: '配置参数', link: 'Common-Config-Manual' },
{ text: 'ConfigNode配置参数', link: 'ConfigNode-Config-Manual' },
{ text: 'DataNode配置参数', link: 'DataNode-Config-Manual' },
{ text: '状态码', link: 'Status-Codes' },
{ text: '关键字', link: 'Keywords' },
],
Expand Down
5 changes: 4 additions & 1 deletion src/.vuepress/sidebar_timecho/V1.2.x/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const enSidebar = {
],
},
{
text: 'Deployment and Maintenance',
text: 'Deployment & Maintenance',
collapsible: true,
prefix: 'Deployment-and-Maintenance/',
// children: 'structure',
Expand All @@ -70,6 +70,7 @@ export const enSidebar = {
{ text: 'Get Installation Package', link: 'Get-Installation-Package' },
{ text: 'Deployment Guide', link: 'Deployment-Guide_timecho' },
{ text: 'Docker Install', link: 'Docker-Install' },
{ text: 'Monitoring-Board-Install-and-Deploy', link: 'Monitoring-Board-Install-and-Deploy' },
{ text: 'Security Management', link: 'Security-Management_timecho' },
],
},
Expand Down Expand Up @@ -169,6 +170,8 @@ export const enSidebar = {
// children: 'structure',
children: [
{ text: 'Common Config Manual', link: 'Common-Config-Manual' },
{ text: 'ConfigNode Config Manual', link: 'ConfigNode-Config-Manual' },
{ text: 'DataNode Config Manual', link: 'DataNode-Config-Manual' },
{ text: 'Status Codes', link: 'Status-Codes' },
{ text: 'Keywords', link: 'Keywords' },
],
Expand Down
3 changes: 3 additions & 0 deletions src/.vuepress/sidebar_timecho/V1.2.x/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const zhSidebar = {
{ text: '部署指导', link: 'Deployment-Guide_timecho' },
{ text: 'docker部署', link: 'Docker-Install' },
{ text: '安全控制', link: 'Security-Management_timecho' },
{ text: '监控面板安装部署', link: 'Monitoring-Board-Install-and-Deploy' },
{ text: '慢查询管理', link: 'Slow-Query-Management' },
],
},
Expand Down Expand Up @@ -170,6 +171,8 @@ export const zhSidebar = {
// children: 'structure',
children: [
{ text: '配置参数', link: 'Common-Config-Manual' },
{ text: 'ConfigNode配置参数', link: 'ConfigNode-Config-Manual' },
{ text: 'DataNode配置参数', link: 'DataNode-Config-Manual' },
{ text: '状态码', link: 'Status-Codes' },
{ text: '关键字', link: 'Keywords' },
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<!--

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

-->

# Monitoring Board Install and Deploy
From the Apache IoTDB 1.0 version, we introduced the system monitoring module, you can complete the Apache IoTDB important operational indicators for monitoring, this article describes how to open the system monitoring module in the Apache IoTDB distribution, and the use of Prometheus + Grafana way to complete the visualisation of the system monitoring indicators.

## pre-preparation

### software requirement

1. Apache IoTDB: version 1.0 and above, download from the official website: https://iotdb.apache.org/Download/
2. Prometheus: version 2.30.3 and above, download from the official website: https://prometheus.io/download/
3. Grafana: version 8.4.2 and above, download from the official website: https://grafana.com/grafana/download
4. IoTDB-Grafana installer: Grafana Kanban is an IoTDB Enterprise Edition tool, and you may contact your sales for the relevant installer.

### cluster requirement

Make sure that the IoTDB cluster is started before doing the following.

### clarification

This doc will build the monitoring dashboard on one machine (1 ConfigNode and 1 DataNode) environment, other cluster configurations are similar, users can adjust the configuration according to their own cluster situation (the number of ConfigNode and DataNode). The basic configuration information of the cluster built in this paper is shown in the table below.

| NODETYPE | NODEIP | Monitor Pusher | Monitor Level | Monitor Port |
| ---------- | --------- | -------------- | ------------ | --------- |
| ConfigNode | 127.0.0.1 | PROMETHEUS | IMPORTANT | 9091 |
| DataNode | 127.0.0.1 | PROMETHEUS | IMPORTANT | 9093 |

## configure Prometheus capture monitoring metrics

1. Download the installation package. Download the Prometheus binary package locally, unzip it and go to the corresponding folder:

```Shell
tar xvfz prometheus-*.tar.gz
cd prometheus-*
```

2. Modify the configuration. Modify the Prometheus configuration file prometheus.yml as follows:
a. Added confignode task to collect monitoring data from ConfigNode
b. Add datanode task to collect monitoring data from DataNode

```YAML
global:
scrape_interval: 15s

scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: "confignode"
static_configs:
- targets: ["localhost:9091"]
honor_labels: true
- job_name: "datanode"
static_configs:
- targets: ["localhost:9093"]
honor_labels: true
```

3. Start Promethues. the default expiration time for Prometheus monitoring data is 15d. in production environments, it is recommended to adjust the expiration time to 180d or more in order to track historical monitoring data for a longer period of time, as shown in the following startup command:

```Shell
./prometheus --config.file=prometheus.yml --storage.tsdb.retention.time=180d
```

4. Confirm the startup is successful. Enter http://localhost:9090 in the browser to enter Prometheus, click to enter the Target interface under Status (Figure 1 below), when you see State are Up, it means the configuration is successful and connected (Figure 2 below), click the link on the left side to jump to the webpage monitoring.

![](https://alioss.timecho.com/docs/img/1a.PNG)
![](https://alioss.timecho.com/docs/img/2a.PNG)



## Using Grafana to View Monitoring Data

### Step1:Grafana Installation, Configuration and Startup

1. Download the binary package of Grafana locally, unzip it and go to the corresponding folder:

```Shell
tar -zxvf grafana-*.tar.gz
cd grafana-*
```

2. Start Grafana and enter:

```Shell
./bin/grafana-server web
```

3. Enter http://localhost:3000 in your browser to access Grafana, the default initial username and password are both admin.
4. First we configure the Data Source in Configuration to be Prometheus.

![](https://alioss.timecho.com/docs/img/3a.png)

5. When configuring the Data Source, pay attention to the URL where Prometheus is located, and click Save & Test after configuration, the Data source is working prompt appears, then the configuration is successful.

![](https://alioss.timecho.com/docs/img/4a.png)

### Step2:Use the official Grafana dashboard provided by IoTDB

1. Enter Grafana,click Browse of Dashboards

![](https://alioss.timecho.com/docs/img/5a.png)

2. Click the Import button on the right

![](https://alioss.timecho.com/docs/img/6a.png)

3. Select a way to import Dashboard
a. Upload the Json file of the downloaded Dashboard locally
b. Enter the URL or ID of the Dashboard obtained from the Grafana website
c. Paste the contents of the Dashboard's Json file

![](https://alioss.timecho.com/docs/img/7a.png)

4. Select Prometheus in the Dashboard as the Data Source you just configured and click Import

![](https://alioss.timecho.com/docs/img/8a.png)

5. Then enter Dashboard,select job to be ConfigNode,then following monitoring dashboard will be seen:

![](https://alioss.timecho.com/docs/img/9a.png)

6. Similarly, we can import the Apache DataNode Dashboard, select job as DataNode,then following monitoring dashboard will be seen:

![](https://alioss.timecho.com/docs/img/10a.pngA)

### Step3:Creating a new Dashboard for data visualisation

1. First create the Dashboard, then create the Panel.

![](https://alioss.timecho.com/docs/img/11a.png)

2. After that, you can visualize the monitoring-related data in the panel according to your needs (all relevant monitoring metrics can be filtered by selecting confignode/datanode in the job first).

![](https://alioss.timecho.com/docs/img/12a.png)

3. Once the visualisation of the monitoring metrics selected for attention is complete, we get a panel like this:

![](https://alioss.timecho.com/docs/img/13a.png)
Loading