Fix broken links to upstream prometheus-operator GitHub repo

* Some links were updated only to reflect the master -> main naming change
This commit is contained in:
Billy Tat
2025-05-28 13:42:31 -07:00
parent 7630d7b766
commit d694bfd026
108 changed files with 144 additions and 144 deletions
@@ -30,7 +30,7 @@ PrometheusRule 定义了一组 Prometheus 告警和/或记录规则。
## 关于 PrometheusRule 自定义资源
当你定义规则时(在 PrometheusRule 资源的 RuleGroup 中声明),[规则本身的规范](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule)会包含标签,然后 Alertmanager 会使用这些标签来确定接收此告警的路由。例如,标签为 `team: front-end` 的告警将​​发送到与该标签匹配的所有路由。
当你定义规则时(在 PrometheusRule 资源的 RuleGroup 中声明),[规则本身的规范](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule)会包含标签,然后 Alertmanager 会使用这些标签来确定接收此告警的路由。例如,标签为 `team: front-end` 的告警将​​发送到与该标签匹配的所有路由。
Prometheus 规则文件保存在 PrometheusRule 自定义资源中。PrometheusRule 支持定义一个或多个 RuleGroup。每个 RuleGroup 由一组 Rule 对象组成,每个 Rule 对象均能表示告警或记录规则,并具有以下字段:
@@ -39,7 +39,7 @@ Prometheus 规则文件保存在 PrometheusRule 自定义资源中。PrometheusR
- 用于标记告警或记录的标签(例如集群名称或严重性)
- 对需要在告警通知上显示的其他重要信息进行编码的注释(例如摘要、描述、消息、Runbook URL 等)。记录规则不需要此字段。
有关可以指定的字段的更多信息,请查看 [Prometheus Operator 规范。](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#prometheusrulespec)
有关可以指定的字段的更多信息,请查看 [Prometheus Operator 规范。](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#prometheusrulespec)
你可以使用 Prometheus 对象中的标签选择器字段 `ruleSelector` 来定义要挂载到 Prometheus 的规则文件。
@@ -8,7 +8,7 @@ title: 配置
本文介绍在 Rancher UI 中配置 Monitoring V2 的一些最重要选项。
有关为 Prometheus 配置自定义抓取目标和规则的信息,请参阅 [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator) 的上游文档。Prometheus Operator [设计文档](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md)中解释了一些最重要的自定义资源。Prometheus Operator 文档还可以帮助你设置 RBAC、Thanos 或进行自定义配置。
有关为 Prometheus 配置自定义抓取目标和规则的信息,请参阅 [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator) 的上游文档。Prometheus Operator [设计文档](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md)中解释了一些最重要的自定义资源。Prometheus Operator 文档还可以帮助你设置 RBAC、Thanos 或进行自定义配置。
## 设置资源限制和请求
@@ -95,7 +95,7 @@ Alertmanager UI 可让你查看最近触发的告警。
### 查看 PrometheusRules
当你定义规则时(在 PrometheusRule 资源的 RuleGroup 中声明),[规则本身的规范](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule)会包含标签,然后 Alertmanager 会使用这些标签来确定接收对应告警的路由。
当你定义规则时(在 PrometheusRule 资源的 RuleGroup 中声明),[规则本身的规范](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule)会包含标签,然后 Alertmanager 会使用这些标签来确定接收对应告警的路由。
要查看 PrometheusRule,请安装 `rancher-monitoring`。然后:
@@ -80,7 +80,7 @@ PrometheusRule 支持定义一个或多个 RuleGroup。每个 RuleGroup 由一
- 用于标记告警或记录的标签(例如集群名称或严重性)
- 对需要在告警通知上显示的其他重要信息进行编码的注释(例如摘要、描述、消息、Runbook URL 等)。记录规则不需要此字段。
在评估[规则](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#rule)时,Prometheus 将执行配置的 PromQL 查询,添加其他标签(或注释 - 仅用于告警规则),并为规则执行所需的操作。例如,如果某个告警规则将 `team:front-end` 作为标签添加到配置的 PromQL 查询,该标签会尾附到触发的告警,这将允许 Alertmanager 将告警转发到正确的接收器。
在评估[规则](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule)时,Prometheus 将执行配置的 PromQL 查询,添加其他标签(或注释 - 仅用于告警规则),并为规则执行所需的操作。例如,如果某个告警规则将 `team:front-end` 作为标签添加到配置的 PromQL 查询,该标签会尾附到触发的告警,这将允许 Alertmanager 将告警转发到正确的接收器。
### 告警和记录规则
@@ -178,7 +178,7 @@ PushProx 允许 Prometheus 跨网络边界抓取指标,这样,用户就不
### 定义要抓取的指标
ServiceMonitor 和 PodMonitor 定义了 Prometheus 要抓取的目标。[Prometheus 自定义资源](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md#prometheus)告诉 Prometheus 应该使用哪个 ServiceMonitor 或 PodMonitor 来确定从哪里抓取指标。
ServiceMonitor 和 PodMonitor 定义了 Prometheus 要抓取的目标。[Prometheus 自定义资源](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md#prometheus)告诉 Prometheus 应该使用哪个 ServiceMonitor 或 PodMonitor 来确定从哪里抓取指标。
Prometheus Operator 观察 ServiceMonitor 和 PodMonitor。当它观察到二者被创建或更新时,它会调用 Prometheus API 来更新 Prometheus 自定义资源中的抓取配置,并使该配置与 ServiceMonitor 或 PodMonitor 中的抓取配置保持同步。此抓取配置告诉 Prometheus 从哪些端点抓取指标,以及如何标记这些端点的指标。
@@ -4,7 +4,7 @@ title: 示例
## ServiceMonitor
你可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml)找到 ServiceMonitor 自定义资源的示例。
你可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml)找到 ServiceMonitor 自定义资源的示例。
## PodMonitor
@@ -42,7 +42,7 @@ Alerting Drivers 为 Alertmanager 将告警代理到非原生接收器,例如
| 字段 | 默认 | 描述 |
|-------|--------------|---------|
| 分组依据 | N/A | 用于分组的标签列表。所有标签都必须是唯一的。如果提供了特殊标签“...”(由所有可能的标签聚合),标签必须在列表中是唯一的元素。接受字符串列表。有关详细信息,请参阅[上游文档](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#route)。 |
| 分组依据 | N/A | 用于分组的标签列表。所有标签都必须是唯一的。如果提供了特殊标签“...”(由所有可能的标签聚合),标签必须在列表中是唯一的元素。接受字符串列表。有关详细信息,请参阅[上游文档](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#route)。 |
| 组等待时长 | 30s | 在发送之前,缓冲同一组告警的等待时间。 |
| 组间隔 | 5m | 等待多长时间才发送已添加到告警组的告警,其中该告警组的初次通知已被发送。 |
| 重复间隔 | 4h | 等待多长时间后,才重新发送已发送的告警。 |
@@ -22,7 +22,7 @@ ServiceMonitor 比 PodMonitor 更常用,推荐用于大多数用例。
如果集群中的任何 Service 与 ServiceMonitor `selector` 字段中的标签匹配,则会根据 ServiceMonitor 指定的 `endpoints` 进行监控。有关可以指定的字段的更多信息,请查看 Prometheus Operator 的[规范](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#servicemonitor)。
有关 ServiceMonitor 工作原理的更多信息,请参阅 [Prometheus Operator 文档](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/running-exporters.md)。
有关 ServiceMonitor 工作原理的更多信息,请参阅 [Prometheus Operator 文档](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/running-exporters.md)。
## PodMonitor