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
31 changes: 25 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,25 @@ scrape_configs:
...
```

如需开启 TiDB、PD 和 TiKV 等组件的报警规则,请单独下载组件对应的报警规则文件,并在 Prometheus 的配置文件中添加报警规则文件的配置。

- TiDB:[`tidb.rules.yml`](https://github.com/pingcap/tidb/blob/master/pkg/metrics/alertmanager/tidb.rules.yml)
- PD:[`pd.rules.yml`](https://github.com/tikv/pd/blob/master/metrics/alertmanager/pd.rules.yml)
- TiKV:[`tikv.rules.yml`](https://github.com/tikv/tikv/blob/master/metrics/alertmanager/tikv.rules.yml)
- TiFlash:[`tiflash.rules.yml`](https://github.com/pingcap/tiflash/blob/master/metrics/alertmanager/tiflash.rules.yml)
- TiCDC:[`ticdc.rules.yml`](https://github.com/pingcap/tiflow/blob/master/metrics/alertmanager/ticdc.rules.yml)
- TiDB Lightning:[`lightning.rules.yml`](https://github.com/pingcap/tidb/blob/master/br/metrics/alertmanager/lightning.rules.yml)

```ini
rule_files:
- 'tidb.rules.yml'
- 'pd.rules.yml'
- 'tikv.rules.yml'
- 'tiflash.rules.yml'
- 'ticdc.rules.yml'
- 'lightning.rules.yml'
```

启动 Prometheus 服务:

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

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

Expand Down
2 changes: 2 additions & 0 deletions releases/release-8.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ TiDB 版本:8.0.0
>
> 以下为从 v7.6.0 升级至当前版本 (v8.0.0) 所需兼容性变更信息。如果从 v7.5.0 或之前版本升级到当前版本,可能也需要考虑和查看中间版本 Release Notes 中提到的兼容性变更信息。

- 由 TiUP 默认部署的 Prometheus 版本从 2.27.1 升级到 2.49.1
- 由 TiUP 默认部署的 Grafana 版本从 7.5.11 升级到 7.5.17
- 移除未 GA 但默认启用的 witness 相关调度器 [#7765](https://github.com/tikv/pd/pull/7765) @[rleungx](https://github.com/rleungx)

### 行为变更
Expand Down
2 changes: 1 addition & 1 deletion upgrade-tidb-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ summary: TiUP 可用于 TiDB 升级。升级过程中需注意不支持 TiFlash
- 支持 TiDB Binlog,TiCDC,TiFlash 等组件版本的升级。
- 将 v6.3.0 之前的 TiFlash 升级至 v6.3.0 及之后的版本时,需要特别注意:在 Linux AMD64 架构的硬件平台部署 TiFlash 时,CPU 必须支持 AVX2 指令集。而在 Linux ARM64 架构的硬件平台部署 TiFlash 时,CPU 必须支持 ARMv8 架构。具体请参考 [6.3.0 版本 Release Notes](/releases/release-6.3.0.md#其他) 中的描述。
- 具体不同版本的兼容性说明,请查看各个版本的 [Release Note](/releases/release-notes.md)。请根据各个版本的 Release Note 的兼容性更改调整集群的配置。
- 升级 v5.3 之前版本的集群到 v5.3 及后续版本时,默认部署的 Prometheus 会从 v2.8.1 升级到 v2.27.1,v2.27.1 提供更多的功能并解决了安全风险。Prometheus v2.27.1 相对于 v2.8.1 存在 Alert 时间格式变化,详情见 [Prometheus commit](https://github.com/prometheus/prometheus/commit/7646cbca328278585be15fa615e22f2a50b47d06)。
- 升级 v5.3 之前版本的集群到 v5.3 及后续版本时,默认部署的 Prometheus 生成的 Alert 存在时间格式变化。该格式变化是从 Prometheus v2.27.1 开始引入的,详情见 [Prometheus commit](https://github.com/prometheus/prometheus/commit/7646cbca328278585be15fa615e22f2a50b47d06)。

## 2. 升级前准备

Expand Down
Loading