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

bump up the prometheus and grafana versions #17833

Merged
merged 10 commits into from
Jul 23, 2024
22 changes: 16 additions & 6 deletions deploy-monitoring-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ summary: 本文适用于手动部署 TiDB 监控报警系统的用户。假设 T
{{< copyable "shell-regular" >}}

```bash
wget https://download.pingcap.org/prometheus-2.27.1.linux-amd64.tar.gz
wget https://github.com/prometheus/prometheus/releases/download/v2.49.1/prometheus-2.49.1.linux-amd64.tar.gz
wget https://download.pingcap.org/node_exporter-v1.3.1-linux-amd64.tar.gz
wget https://download.pingcap.org/grafana-7.5.11.linux-amd64.tar.gz
wget https://download.pingcap.org/grafana-7.5.17.linux-amd64.tar.gz
wuhuizuo marked this conversation as resolved.
Show resolved Hide resolved
```

解压二进制包:

{{< copyable "shell-regular" >}}

```bash
tar -xzf prometheus-2.27.1.linux-amd64.tar.gz
tar -xzf prometheus-2.49.1.linux-amd64.tar.gz
tar -xzf node_exporter-v1.3.1-linux-amd64.tar.gz
tar -xzf grafana-7.5.11.linux-amd64.tar.gz
tar -xzf grafana-7.5.17.linux-amd64.tar.gz
wuhuizuo marked this conversation as resolved.
Show resolved Hide resolved
```

### 第 2 步:在 Node1,Node2,Node3,Node4 上启动 `node_exporter`
Expand All @@ -67,7 +67,7 @@ cd node_exporter-v1.3.1-linux-amd64
{{< copyable "shell-regular" >}}

```bash
cd prometheus-2.27.1.linux-amd64 &&
cd prometheus-2.49.1.linux-amd64 &&
wuhuizuo marked this conversation as resolved.
Show resolved Hide resolved
vi prometheus.yml
```

Expand Down Expand Up @@ -119,6 +119,16 @@ scrape_configs:
...
```

如需告警,可额外下载告警文件 (可从 [pingcap/tidb](https://github.com/pingcap/tidb/blob/master/pkg/metrics/alertmanager/tidb.rules.yml),[tikv/tikv](https://github.com/tikv/tikv/blob/master/metrics/alertmanager/tikv.rules.yml),[tikv/pd](https://github.com/tikv/pd/blob/master/metrics/alertmanager/pd.rules.yml) 下载)。并在 prometheus 中添加如下配置:
qiancai marked this conversation as resolved.
Show resolved Hide resolved

```
qiancai marked this conversation as resolved.
Show resolved Hide resolved
rule_files:
- 'tidb.rules.yml'
- 'pd.rules.yml'
- 'tikv.rules.yml'
- 'tikv.accelerate.rules.yml'
xhebox marked this conversation as resolved.
Show resolved Hide resolved
```

启动 Prometheus 服务:

{{< copyable "shell-regular" >}}
Expand All @@ -139,7 +149,7 @@ scrape_configs:
编辑 Grafana 的配置文件:

```bash
cd grafana-7.5.11 &&
cd grafana-7.5.17 &&
vi conf/grafana.ini
```

Expand Down