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 17:03:15 -07:00
parent 7630d7b766
commit d694bfd026
108 changed files with 144 additions and 144 deletions
@@ -41,7 +41,7 @@ Prometheus RemoteRead and RemoteWrite can be configured as custom answers in the
For more information on remote endpoints and storage, refer to the [Prometheus documentation.](https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage)
The Prometheus operator documentation contains the full [RemoteReadSpec](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#remotereadspec) and [RemoteWriteSpec.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#remotewritespec)
The Prometheus operator documentation contains the full [RemoteReadSpec](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#remotereadspec) and [RemoteWriteSpec.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#remotewritespec)
An example configuration would be:
@@ -74,7 +74,7 @@ To see the Prometheus Targets, install `rancher-monitoring`. Then go to the **Cl
### Viewing the PrometheusRules
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive a certain Alert.
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive a certain Alert.
To see the PrometheusRules, install `rancher-monitoring`. Then go to the **Cluster Explorer.** In the top left corner, click **Cluster Explorer > Monitoring.** Then click **Prometheus Rules.**
@@ -85,7 +85,7 @@ A PrometheusRule allows you to define one or more RuleGroups. Each RuleGroup con
- Labels that should be attached to the alert or record that identify it (e.g. cluster name or severity)
- Annotations that encode any additional important pieces of information that need to be displayed on the notification for an alert (e.g. summary, description, message, runbook URL, etc.). This field is not required for recording rules.
Upon evaluating a [rule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#rule), Prometheus runs the provided PromQL query, adds the provided labels, and runs the appropriate action for the rule. If the rule triggers an alert, Prometheus also adds the provided annotations. For example, an Alerting Rule that adds `team: front-end` as a label to the provided PromQL query will append that label to the fired alert, which will allow Alertmanager to forward the alert to the correct Receiver.
Upon evaluating a [rule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule), Prometheus runs the provided PromQL query, adds the provided labels, and runs the appropriate action for the rule. If the rule triggers an alert, Prometheus also adds the provided annotations. For example, an Alerting Rule that adds `team: front-end` as a label to the provided PromQL query will append that label to the fired alert, which will allow Alertmanager to forward the alert to the correct Receiver.
### Alerting and Recording Rules
@@ -183,7 +183,7 @@ Refer to [Scraping Metrics with PushProx](#scraping-metrics-with-pushprox) for m
### Defining what Metrics are Scraped
ServiceMonitors and PodMonitors define targets that are intended for Prometheus to scrape. The [Prometheus custom resource](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md#prometheus) tells Prometheus which ServiceMonitors or PodMonitors it should use to find out where to scrape metrics from.
ServiceMonitors and PodMonitors define targets that are intended for Prometheus to scrape. The [Prometheus custom resource](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md#prometheus) tells Prometheus which ServiceMonitors or PodMonitors it should use to find out where to scrape metrics from.
The Prometheus Operator observes the ServiceMonitors and PodMonitors. When it observes that they are created or updated, it calls the Prometheus API to update the scrape configuration in the Prometheus custom resource and keep it in sync with the scrape configuration in the ServiceMonitors or PodMonitors. This scrape configuration tells Prometheus which endpoints to scrape metrics from and how it will label the metrics from those endpoints.
@@ -28,7 +28,7 @@ To create rule groups in the Rancher UI,
## About the PrometheusRule Custom Resource
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive this Alert. For example, an Alert with the label `team: front-end` will be sent to all Routes that match on that label.
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive this Alert. For example, an Alert with the label `team: front-end` will be sent to all Routes that match on that label.
Prometheus rule files are held in PrometheusRule custom resources. A PrometheusRule allows you to define one or more RuleGroups. Each RuleGroup consists of a set of Rule objects that can each represent either an alerting or a recording rule with the following fields:
@@ -37,7 +37,7 @@ Prometheus rule files are held in PrometheusRule custom resources. A PrometheusR
- Labels that should be attached to the alert or record that identify it (e.g. cluster name or severity)
- Annotations that encode any additional important pieces of information that need to be displayed on the notification for an alert (e.g. summary, description, message, runbook URL, etc.). This field is not required for recording rules.
For more information on what fields can be specified, please look at the [Prometheus Operator spec.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#prometheusrulespec)
For more information on what fields can be specified, please look at the [Prometheus Operator spec.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#prometheusrulespec)
Use the label selector field `ruleSelector` in the Prometheus object to define the rule files that you want to be mounted into Prometheus.
@@ -8,7 +8,7 @@ title: Monitoring V2 Configuration Guides
This page captures some of the most important options for configuring Monitoring V2 in the Rancher UI.
For information on configuring custom scrape targets and rules for Prometheus, please refer to the upstream documentation for the [Prometheus Operator.](https://github.com/prometheus-operator/prometheus-operator) Some of the most important custom resources are explained in the Prometheus Operator [design documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md) The Prometheus Operator documentation can help also you set up RBAC, Thanos, or custom configuration.
For information on configuring custom scrape targets and rules for Prometheus, please refer to the upstream documentation for the [Prometheus Operator.](https://github.com/prometheus-operator/prometheus-operator) Some of the most important custom resources are explained in the Prometheus Operator [design documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md) The Prometheus Operator documentation can help also you set up RBAC, Thanos, or custom configuration.
## Setting Resource Limits and Requests
@@ -8,7 +8,7 @@ title: Monitoring V2 Configuration Examples
## ServiceMonitor
See the official prometheus-operator GitHub repo for an example [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) YAML.
See the official prometheus-operator GitHub repo for an example [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) YAML.
## PodMonitor
@@ -22,7 +22,7 @@ When a ServiceMonitor is created, the Prometheus Operator updates the Prometheus
Any Services in your cluster that match the labels located within the ServiceMonitor `selector` field will be monitored based on the `endpoints` specified on the ServiceMonitor. For more information on what fields can be specified, please look at the [spec](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#servicemonitor) provided by Prometheus Operator.
For more information about how ServiceMonitors work, refer to the [Prometheus Operator documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/running-exporters.md)
For more information about how ServiceMonitors work, refer to the [Prometheus Operator documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/running-exporters.md)
## PodMonitors
@@ -34,7 +34,7 @@ To create rule groups in the Rancher UI,
### About the PrometheusRule Custom Resource
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive this Alert. For example, an Alert with the label `team: front-end` will be sent to all Routes that match on that label.
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive this Alert. For example, an Alert with the label `team: front-end` will be sent to all Routes that match on that label.
Prometheus rule files are held in PrometheusRule custom resources. A PrometheusRule allows you to define one or more RuleGroups. Each RuleGroup consists of a set of Rule objects that can each represent either an alerting or a recording rule with the following fields:
@@ -43,7 +43,7 @@ Prometheus rule files are held in PrometheusRule custom resources. A PrometheusR
- Labels that should be attached to the alert or record that identify it (e.g. cluster name or severity)
- Annotations that encode any additional important pieces of information that need to be displayed on the notification for an alert (e.g. summary, description, message, runbook URL, etc.). This field is not required for recording rules.
For more information on what fields can be specified, please look at the [Prometheus Operator spec.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#prometheusrulespec)
For more information on what fields can be specified, please look at the [Prometheus Operator spec.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#prometheusrulespec)
Use the label selector field `ruleSelector` in the Prometheus object to define the rule files that you want to be mounted into Prometheus.
@@ -8,7 +8,7 @@ title: Monitoring Configuration Guides
This page captures some of the most important options for configuring Monitoring V2 in the Rancher UI.
For information on configuring custom scrape targets and rules for Prometheus, please refer to the upstream documentation for the [Prometheus Operator.](https://github.com/prometheus-operator/prometheus-operator) Some of the most important custom resources are explained in the Prometheus Operator [design documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md) The Prometheus Operator documentation can help also you set up RBAC, Thanos, or custom configuration.
For information on configuring custom scrape targets and rules for Prometheus, please refer to the upstream documentation for the [Prometheus Operator.](https://github.com/prometheus-operator/prometheus-operator) Some of the most important custom resources are explained in the Prometheus Operator [design documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md) The Prometheus Operator documentation can help also you set up RBAC, Thanos, or custom configuration.
## Setting Resource Limits and Requests
@@ -99,7 +99,7 @@ To see the Prometheus Targets, install `rancher-monitoring`. Then:
### Viewing the PrometheusRules
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive a certain Alert.
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive a certain Alert.
To see the PrometheusRules, install `rancher-monitoring`. Then:
@@ -85,7 +85,7 @@ A PrometheusRule allows you to define one or more RuleGroups. Each RuleGroup con
- Labels that should be attached to the alert or record that identify it (e.g. cluster name or severity)
- Annotations that encode any additional important pieces of information that need to be displayed on the notification for an alert (e.g. summary, description, message, runbook URL, etc.). This field is not required for recording rules.
Upon evaluating a [rule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#rule), Prometheus runs the provided PromQL query, adds the provided labels, and runs the appropriate action for the rule. If the rule triggers an alert, Prometheus also adds the provided annotations. For example, an Alerting Rule that adds `team: front-end` as a label to the provided PromQL query will append that label to the fired alert, which will allow Alertmanager to forward the alert to the correct Receiver.
Upon evaluating a [rule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule), Prometheus runs the provided PromQL query, adds the provided labels, and runs the appropriate action for the rule. If the rule triggers an alert, Prometheus also adds the provided annotations. For example, an Alerting Rule that adds `team: front-end` as a label to the provided PromQL query will append that label to the fired alert, which will allow Alertmanager to forward the alert to the correct Receiver.
### Alerting and Recording Rules
@@ -183,7 +183,7 @@ Refer to [Scraping Metrics with PushProx](#scraping-metrics-with-pushprox) for m
### Defining what Metrics are Scraped
ServiceMonitors and PodMonitors define targets that are intended for Prometheus to scrape. The [Prometheus custom resource](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md#prometheus) tells Prometheus which ServiceMonitors or PodMonitors it should use to find out where to scrape metrics from.
ServiceMonitors and PodMonitors define targets that are intended for Prometheus to scrape. The [Prometheus custom resource](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md#prometheus) tells Prometheus which ServiceMonitors or PodMonitors it should use to find out where to scrape metrics from.
The Prometheus Operator observes the ServiceMonitors and PodMonitors. When it observes that they are created or updated, it calls the Prometheus API to update the scrape configuration in the Prometheus custom resource and keep it in sync with the scrape configuration in the ServiceMonitors or PodMonitors. This scrape configuration tells Prometheus which endpoints to scrape metrics from and how it will label the metrics from those endpoints.
@@ -8,7 +8,7 @@ title: Monitoring Configuration Examples
## ServiceMonitor
See the official prometheus-operator GitHub repo for an example [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) YAML.
See the official prometheus-operator GitHub repo for an example [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) YAML.
## PodMonitor
@@ -46,7 +46,7 @@ The route needs to refer to a [receiver](./receivers.md) that has already been c
| Field | Default | Description |
|-------|--------------|---------|
| Group By | N/a | List of labels to group by. Labels must be unique. Special label "..." (aggregate by all possible labels), if provided, must be the only element in the list. Accepts a list of strings. See the [upstream documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#route) for details. |
| Group By | N/a | List of labels to group by. Labels must be unique. Special label "..." (aggregate by all possible labels), if provided, must be the only element in the list. Accepts a list of strings. See the [upstream documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#route) for details. |
| Group Wait | 30s | How long to wait to buffer alerts of the same group before sending initially. |
| Group Interval | 5m | How long to wait before sending an alert that has been added to a group of alerts for which an initial notification has already been sent. |
| Repeat Interval | 4h | How long to wait before re-sending a given alert that has already been sent. |
@@ -26,7 +26,7 @@ When a ServiceMonitor is created, the Prometheus Operator updates the Prometheus
Any Services in your cluster that match the labels located within the ServiceMonitor `selector` field will be monitored based on the `endpoints` specified on the ServiceMonitor. For more information on what fields can be specified, please look at the [spec](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#servicemonitor) provided by Prometheus Operator.
For more information about how ServiceMonitors work, refer to the [Prometheus Operator documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/running-exporters.md)
For more information about how ServiceMonitors work, refer to the [Prometheus Operator documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/running-exporters.md)
## PodMonitors
@@ -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
@@ -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,11 +4,11 @@ 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
你可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/user-guides/getting-started/example-app-pod-monitor.yaml)找到 PodMonitor 示例,还可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/user-guides/getting-started/prometheus-pod-monitor.yaml)找到引用它的 Prometheus 资源示例。
你可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/user-guides/getting-started/example-app-pod-monitor.yaml)找到 PodMonitor 示例,还可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/user-guides/getting-started/prometheus-pod-monitor.yaml)找到引用它的 Prometheus 资源示例。
## PrometheusRule
@@ -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
@@ -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,11 +4,11 @@ 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
你可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/user-guides/getting-started/example-app-pod-monitor.yaml)找到 PodMonitor 示例,还可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/user-guides/getting-started/prometheus-pod-monitor.yaml)找到引用它的 Prometheus 资源示例。
你可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/user-guides/getting-started/example-app-pod-monitor.yaml)找到 PodMonitor 示例,还可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/user-guides/getting-started/prometheus-pod-monitor.yaml)找到引用它的 Prometheus 资源示例。
## PrometheusRule
@@ -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
@@ -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: 配置
本文介绍在 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 或进行自定义配置。
## 设置资源限制和请求
@@ -4,11 +4,11 @@ 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
你可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/user-guides/getting-started/example-app-pod-monitor.yaml)找到 PodMonitor 示例,还可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/user-guides/getting-started/prometheus-pod-monitor.yaml)找到引用它的 Prometheus 资源示例。
你可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/user-guides/getting-started/example-app-pod-monitor.yaml)找到 PodMonitor 示例,还可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/user-guides/getting-started/prometheus-pod-monitor.yaml)找到引用它的 Prometheus 资源示例。
### PrometheusRule
@@ -45,7 +45,7 @@ Alerting Drivers 为 Alertmanager 将告警代理到非原生接收器,例如
:::note
从 Rancher 2.6.5 开始,`分组依据`开始接受字符串列表而不是键值对。有关详细信息,请参阅[上游文档](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#route)。
从 Rancher 2.6.5 开始,`分组依据`开始接受字符串列表而不是键值对。有关详细信息,请参阅[上游文档](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#route)。
:::
@@ -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
@@ -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: 配置
本文介绍在 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 或进行自定义配置。
## 设置资源限制和请求
@@ -4,11 +4,11 @@ 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
你可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/user-guides/getting-started/example-app-pod-monitor.yaml)找到 PodMonitor 示例,还可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/user-guides/getting-started/prometheus-pod-monitor.yaml)找到引用它的 Prometheus 资源示例。
你可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/user-guides/getting-started/example-app-pod-monitor.yaml)找到 PodMonitor 示例,还可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/user-guides/getting-started/prometheus-pod-monitor.yaml)找到引用它的 Prometheus 资源示例。
### PrometheusRule
@@ -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
@@ -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,11 +4,11 @@ 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
你可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/user-guides/getting-started/example-app-pod-monitor.yaml)找到 PodMonitor 示例,还可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/user-guides/getting-started/prometheus-pod-monitor.yaml)找到引用它的 Prometheus 资源示例。
你可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/user-guides/getting-started/example-app-pod-monitor.yaml)找到 PodMonitor 示例,还可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/user-guides/getting-started/prometheus-pod-monitor.yaml)找到引用它的 Prometheus 资源示例。
## PrometheusRule
@@ -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
@@ -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: 配置
本文介绍在 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 或进行自定义配置。
## 设置资源限制和请求
@@ -4,11 +4,11 @@ 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
你可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/user-guides/getting-started/example-app-pod-monitor.yaml)找到 PodMonitor 示例,还可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/user-guides/getting-started/prometheus-pod-monitor.yaml)找到引用它的 Prometheus 资源示例。
你可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/user-guides/getting-started/example-app-pod-monitor.yaml)找到 PodMonitor 示例,还可以在[此处](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/user-guides/getting-started/prometheus-pod-monitor.yaml)找到引用它的 Prometheus 资源示例。
### PrometheusRule
@@ -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
@@ -34,7 +34,7 @@ To create rule groups in the Rancher UI,
### About the PrometheusRule Custom Resource
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive this Alert. For example, an Alert with the label `team: front-end` will be sent to all Routes that match on that label.
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive this Alert. For example, an Alert with the label `team: front-end` will be sent to all Routes that match on that label.
Prometheus rule files are held in PrometheusRule custom resources. A PrometheusRule allows you to define one or more RuleGroups. Each RuleGroup consists of a set of Rule objects that can each represent either an alerting or a recording rule with the following fields:
@@ -43,7 +43,7 @@ Prometheus rule files are held in PrometheusRule custom resources. A PrometheusR
- Labels that should be attached to the alert or record that identify it (e.g. cluster name or severity)
- Annotations that encode any additional important pieces of information that need to be displayed on the notification for an alert (e.g. summary, description, message, runbook URL, etc.). This field is not required for recording rules.
For more information on what fields can be specified, please look at the [Prometheus Operator spec.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#prometheusrulespec)
For more information on what fields can be specified, please look at the [Prometheus Operator spec.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#prometheusrulespec)
Use the label selector field `ruleSelector` in the Prometheus object to define the rule files that you want to be mounted into Prometheus.
@@ -8,7 +8,7 @@ title: Monitoring Configuration Guides
This page captures some of the most important options for configuring Monitoring V2 in the Rancher UI.
For information on configuring custom scrape targets and rules for Prometheus, please refer to the upstream documentation for the [Prometheus Operator.](https://github.com/prometheus-operator/prometheus-operator) Some of the most important custom resources are explained in the Prometheus Operator [design documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md) The Prometheus Operator documentation can help also you set up RBAC, Thanos, or custom configuration.
For information on configuring custom scrape targets and rules for Prometheus, please refer to the upstream documentation for the [Prometheus Operator.](https://github.com/prometheus-operator/prometheus-operator) Some of the most important custom resources are explained in the Prometheus Operator [design documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md) The Prometheus Operator documentation can help also you set up RBAC, Thanos, or custom configuration.
## Setting Resource Limits and Requests
@@ -99,7 +99,7 @@ To see the Prometheus Targets, install `rancher-monitoring`. Then:
### Viewing the PrometheusRules
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive a certain Alert.
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive a certain Alert.
To see the PrometheusRules, install `rancher-monitoring`. Then:
@@ -85,7 +85,7 @@ A PrometheusRule allows you to define one or more RuleGroups. Each RuleGroup con
- Labels that should be attached to the alert or record that identify it (e.g. cluster name or severity)
- Annotations that encode any additional important pieces of information that need to be displayed on the notification for an alert (e.g. summary, description, message, runbook URL, etc.). This field is not required for recording rules.
Upon evaluating a [rule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#rule), Prometheus runs the provided PromQL query, adds the provided labels, and runs the appropriate action for the rule. If the rule triggers an alert, Prometheus also adds the provided annotations. For example, an Alerting Rule that adds `team: front-end` as a label to the provided PromQL query will append that label to the fired alert, which will allow Alertmanager to forward the alert to the correct Receiver.
Upon evaluating a [rule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule), Prometheus runs the provided PromQL query, adds the provided labels, and runs the appropriate action for the rule. If the rule triggers an alert, Prometheus also adds the provided annotations. For example, an Alerting Rule that adds `team: front-end` as a label to the provided PromQL query will append that label to the fired alert, which will allow Alertmanager to forward the alert to the correct Receiver.
### Alerting and Recording Rules
@@ -183,7 +183,7 @@ Refer to [Scraping Metrics with PushProx](#scraping-metrics-with-pushprox) for m
### Defining what Metrics are Scraped
ServiceMonitors and PodMonitors define targets that are intended for Prometheus to scrape. The [Prometheus custom resource](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md#prometheus) tells Prometheus which ServiceMonitors or PodMonitors it should use to find out where to scrape metrics from.
ServiceMonitors and PodMonitors define targets that are intended for Prometheus to scrape. The [Prometheus custom resource](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md#prometheus) tells Prometheus which ServiceMonitors or PodMonitors it should use to find out where to scrape metrics from.
The Prometheus Operator observes the ServiceMonitors and PodMonitors. When it observes that they are created or updated, it calls the Prometheus API to update the scrape configuration in the Prometheus custom resource and keep it in sync with the scrape configuration in the ServiceMonitors or PodMonitors. This scrape configuration tells Prometheus which endpoints to scrape metrics from and how it will label the metrics from those endpoints.
@@ -8,7 +8,7 @@ title: Monitoring Configuration Examples
## ServiceMonitor
See the official prometheus-operator GitHub repo for an example [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) YAML.
See the official prometheus-operator GitHub repo for an example [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) YAML.
## PodMonitor
@@ -46,7 +46,7 @@ The route needs to refer to a [receiver](./receivers.md) that has already been c
| Field | Default | Description |
|-------|--------------|---------|
| Group By | N/a | List of labels to group by. Labels must be unique. Special label "..." (aggregate by all possible labels), if provided, must be the only element in the list. Accepts a list of strings. See the [upstream documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#route) for details. |
| Group By | N/a | List of labels to group by. Labels must be unique. Special label "..." (aggregate by all possible labels), if provided, must be the only element in the list. Accepts a list of strings. See the [upstream documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#route) for details. |
| Group Wait | 30s | How long to wait to buffer alerts of the same group before sending initially. |
| Group Interval | 5m | How long to wait before sending an alert that has been added to a group of alerts for which an initial notification has already been sent. |
| Repeat Interval | 4h | How long to wait before re-sending a given alert that has already been sent. |
@@ -26,7 +26,7 @@ When a ServiceMonitor is created, the Prometheus Operator updates the Prometheus
Any Services in your cluster that match the labels located within the ServiceMonitor `selector` field will be monitored based on the `endpoints` specified on the ServiceMonitor. For more information on what fields can be specified, please look at the [spec](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#servicemonitor) provided by Prometheus Operator.
For more information about how ServiceMonitors work, refer to the [Prometheus Operator documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/running-exporters.md)
For more information about how ServiceMonitors work, refer to the [Prometheus Operator documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/running-exporters.md)
## PodMonitors
@@ -34,7 +34,7 @@ To create rule groups in the Rancher UI,
### About the PrometheusRule Custom Resource
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive this Alert. For example, an Alert with the label `team: front-end` will be sent to all Routes that match on that label.
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive this Alert. For example, an Alert with the label `team: front-end` will be sent to all Routes that match on that label.
Prometheus rule files are held in PrometheusRule custom resources. A PrometheusRule allows you to define one or more RuleGroups. Each RuleGroup consists of a set of Rule objects that can each represent either an alerting or a recording rule with the following fields:
@@ -43,7 +43,7 @@ Prometheus rule files are held in PrometheusRule custom resources. A PrometheusR
- Labels that should be attached to the alert or record that identify it (e.g. cluster name or severity)
- Annotations that encode any additional important pieces of information that need to be displayed on the notification for an alert (e.g. summary, description, message, runbook URL, etc.). This field is not required for recording rules.
For more information on what fields can be specified, please look at the [Prometheus Operator spec.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#prometheusrulespec)
For more information on what fields can be specified, please look at the [Prometheus Operator spec.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#prometheusrulespec)
Use the label selector field `ruleSelector` in the Prometheus object to define the rule files that you want to be mounted into Prometheus.
@@ -8,7 +8,7 @@ title: Monitoring Configuration Guides
This page captures some of the most important options for configuring Monitoring V2 in the Rancher UI.
For information on configuring custom scrape targets and rules for Prometheus, please refer to the upstream documentation for the [Prometheus Operator.](https://github.com/prometheus-operator/prometheus-operator) Some of the most important custom resources are explained in the Prometheus Operator [design documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md) The Prometheus Operator documentation can help also you set up RBAC, Thanos, or custom configuration.
For information on configuring custom scrape targets and rules for Prometheus, please refer to the upstream documentation for the [Prometheus Operator.](https://github.com/prometheus-operator/prometheus-operator) Some of the most important custom resources are explained in the Prometheus Operator [design documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md) The Prometheus Operator documentation can help also you set up RBAC, Thanos, or custom configuration.
## Setting Resource Limits and Requests
@@ -99,7 +99,7 @@ To see the Prometheus Targets, install `rancher-monitoring`. Then:
### Viewing the PrometheusRules
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive a certain Alert.
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive a certain Alert.
To see the PrometheusRules, install `rancher-monitoring`. Then:
@@ -85,7 +85,7 @@ A PrometheusRule allows you to define one or more RuleGroups. Each RuleGroup con
- Labels that should be attached to the alert or record that identify it (e.g. cluster name or severity)
- Annotations that encode any additional important pieces of information that need to be displayed on the notification for an alert (e.g. summary, description, message, runbook URL, etc.). This field is not required for recording rules.
Upon evaluating a [rule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#rule), Prometheus runs the provided PromQL query, adds the provided labels, and runs the appropriate action for the rule. If the rule triggers an alert, Prometheus also adds the provided annotations. For example, an Alerting Rule that adds `team: front-end` as a label to the provided PromQL query will append that label to the fired alert, which will allow Alertmanager to forward the alert to the correct Receiver.
Upon evaluating a [rule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule), Prometheus runs the provided PromQL query, adds the provided labels, and runs the appropriate action for the rule. If the rule triggers an alert, Prometheus also adds the provided annotations. For example, an Alerting Rule that adds `team: front-end` as a label to the provided PromQL query will append that label to the fired alert, which will allow Alertmanager to forward the alert to the correct Receiver.
### Alerting and Recording Rules
@@ -183,7 +183,7 @@ Refer to [Scraping Metrics with PushProx](#scraping-metrics-with-pushprox) for m
### Defining what Metrics are Scraped
ServiceMonitors and PodMonitors define targets that are intended for Prometheus to scrape. The [Prometheus custom resource](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md#prometheus) tells Prometheus which ServiceMonitors or PodMonitors it should use to find out where to scrape metrics from.
ServiceMonitors and PodMonitors define targets that are intended for Prometheus to scrape. The [Prometheus custom resource](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md#prometheus) tells Prometheus which ServiceMonitors or PodMonitors it should use to find out where to scrape metrics from.
The Prometheus Operator observes the ServiceMonitors and PodMonitors. When it observes that they are created or updated, it calls the Prometheus API to update the scrape configuration in the Prometheus custom resource and keep it in sync with the scrape configuration in the ServiceMonitors or PodMonitors. This scrape configuration tells Prometheus which endpoints to scrape metrics from and how it will label the metrics from those endpoints.
@@ -8,7 +8,7 @@ title: Monitoring Configuration Examples
## ServiceMonitor
See the official prometheus-operator GitHub repo for an example [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) YAML.
See the official prometheus-operator GitHub repo for an example [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) YAML.
## PodMonitor
@@ -46,7 +46,7 @@ The route needs to refer to a [receiver](./receivers.md) that has already been c
| Field | Default | Description |
|-------|--------------|---------|
| Group By | N/a | List of labels to group by. Labels must be unique. Special label "..." (aggregate by all possible labels), if provided, must be the only element in the list. Accepts a list of strings. See the [upstream documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#route) for details. |
| Group By | N/a | List of labels to group by. Labels must be unique. Special label "..." (aggregate by all possible labels), if provided, must be the only element in the list. Accepts a list of strings. See the [upstream documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#route) for details. |
| Group Wait | 30s | How long to wait to buffer alerts of the same group before sending initially. |
| Group Interval | 5m | How long to wait before sending an alert that has been added to a group of alerts for which an initial notification has already been sent. |
| Repeat Interval | 4h | How long to wait before re-sending a given alert that has already been sent. |
@@ -26,7 +26,7 @@ When a ServiceMonitor is created, the Prometheus Operator updates the Prometheus
Any Services in your cluster that match the labels located within the ServiceMonitor `selector` field will be monitored based on the `endpoints` specified on the ServiceMonitor. For more information on what fields can be specified, please look at the [spec](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#servicemonitor) provided by Prometheus Operator.
For more information about how ServiceMonitors work, refer to the [Prometheus Operator documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/running-exporters.md)
For more information about how ServiceMonitors work, refer to the [Prometheus Operator documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/running-exporters.md)
## PodMonitors
@@ -34,7 +34,7 @@ To create rule groups in the Rancher UI,
### About the PrometheusRule Custom Resource
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive this Alert. For example, an Alert with the label `team: front-end` will be sent to all Routes that match on that label.
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive this Alert. For example, an Alert with the label `team: front-end` will be sent to all Routes that match on that label.
Prometheus rule files are held in PrometheusRule custom resources. A PrometheusRule allows you to define one or more RuleGroups. Each RuleGroup consists of a set of Rule objects that can each represent either an alerting or a recording rule with the following fields:
@@ -43,7 +43,7 @@ Prometheus rule files are held in PrometheusRule custom resources. A PrometheusR
- Labels that should be attached to the alert or record that identify it (e.g. cluster name or severity)
- Annotations that encode any additional important pieces of information that need to be displayed on the notification for an alert (e.g. summary, description, message, runbook URL, etc.). This field is not required for recording rules.
For more information on what fields can be specified, please look at the [Prometheus Operator spec.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#prometheusrulespec)
For more information on what fields can be specified, please look at the [Prometheus Operator spec.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#prometheusrulespec)
Use the label selector field `ruleSelector` in the Prometheus object to define the rule files that you want to be mounted into Prometheus.
@@ -8,7 +8,7 @@ title: Monitoring Configuration Guides
This page captures some of the most important options for configuring Monitoring V2 in the Rancher UI.
For information on configuring custom scrape targets and rules for Prometheus, please refer to the upstream documentation for the [Prometheus Operator.](https://github.com/prometheus-operator/prometheus-operator) Some of the most important custom resources are explained in the Prometheus Operator [design documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md) The Prometheus Operator documentation can help also you set up RBAC, Thanos, or custom configuration.
For information on configuring custom scrape targets and rules for Prometheus, please refer to the upstream documentation for the [Prometheus Operator.](https://github.com/prometheus-operator/prometheus-operator) Some of the most important custom resources are explained in the Prometheus Operator [design documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md) The Prometheus Operator documentation can help also you set up RBAC, Thanos, or custom configuration.
## Setting Resource Limits and Requests
@@ -99,7 +99,7 @@ To see the Prometheus Targets, install `rancher-monitoring`. Then:
### Viewing the PrometheusRules
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive a certain Alert.
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive a certain Alert.
To see the PrometheusRules, install `rancher-monitoring`. Then:
@@ -85,7 +85,7 @@ A PrometheusRule allows you to define one or more RuleGroups. Each RuleGroup con
- Labels that should be attached to the alert or record that identify it (e.g. cluster name or severity)
- Annotations that encode any additional important pieces of information that need to be displayed on the notification for an alert (e.g. summary, description, message, runbook URL, etc.). This field is not required for recording rules.
Upon evaluating a [rule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#rule), Prometheus runs the provided PromQL query, adds the provided labels, and runs the appropriate action for the rule. If the rule triggers an alert, Prometheus also adds the provided annotations. For example, an Alerting Rule that adds `team: front-end` as a label to the provided PromQL query will append that label to the fired alert, which will allow Alertmanager to forward the alert to the correct Receiver.
Upon evaluating a [rule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule), Prometheus runs the provided PromQL query, adds the provided labels, and runs the appropriate action for the rule. If the rule triggers an alert, Prometheus also adds the provided annotations. For example, an Alerting Rule that adds `team: front-end` as a label to the provided PromQL query will append that label to the fired alert, which will allow Alertmanager to forward the alert to the correct Receiver.
### Alerting and Recording Rules
@@ -183,7 +183,7 @@ Refer to [Scraping Metrics with PushProx](#scraping-metrics-with-pushprox) for m
### Defining what Metrics are Scraped
ServiceMonitors and PodMonitors define targets that are intended for Prometheus to scrape. The [Prometheus custom resource](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md#prometheus) tells Prometheus which ServiceMonitors or PodMonitors it should use to find out where to scrape metrics from.
ServiceMonitors and PodMonitors define targets that are intended for Prometheus to scrape. The [Prometheus custom resource](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md#prometheus) tells Prometheus which ServiceMonitors or PodMonitors it should use to find out where to scrape metrics from.
The Prometheus Operator observes the ServiceMonitors and PodMonitors. When it observes that they are created or updated, it calls the Prometheus API to update the scrape configuration in the Prometheus custom resource and keep it in sync with the scrape configuration in the ServiceMonitors or PodMonitors. This scrape configuration tells Prometheus which endpoints to scrape metrics from and how it will label the metrics from those endpoints.
@@ -8,7 +8,7 @@ title: Monitoring Configuration Examples
## ServiceMonitor
See the official prometheus-operator GitHub repo for an example [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) YAML.
See the official prometheus-operator GitHub repo for an example [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) YAML.
## PodMonitor
@@ -49,7 +49,7 @@ The route needs to refer to a [receiver](./receivers.md) that has already been c
:::note
As of Rancher v2.6.5, `Group By` now accepts a list of strings instead of key-value pairs. See the [upstream documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#route) for details.
As of Rancher v2.6.5, `Group By` now accepts a list of strings instead of key-value pairs. See the [upstream documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#route) for details.
:::
@@ -26,7 +26,7 @@ When a ServiceMonitor is created, the Prometheus Operator updates the Prometheus
Any Services in your cluster that match the labels located within the ServiceMonitor `selector` field will be monitored based on the `endpoints` specified on the ServiceMonitor. For more information on what fields can be specified, please look at the [spec](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#servicemonitor) provided by Prometheus Operator.
For more information about how ServiceMonitors work, refer to the [Prometheus Operator documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/running-exporters.md)
For more information about how ServiceMonitors work, refer to the [Prometheus Operator documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/running-exporters.md)
## PodMonitors
@@ -34,7 +34,7 @@ To create rule groups in the Rancher UI,
### About the PrometheusRule Custom Resource
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive this Alert. For example, an Alert with the label `team: front-end` will be sent to all Routes that match on that label.
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive this Alert. For example, an Alert with the label `team: front-end` will be sent to all Routes that match on that label.
Prometheus rule files are held in PrometheusRule custom resources. A PrometheusRule allows you to define one or more RuleGroups. Each RuleGroup consists of a set of Rule objects that can each represent either an alerting or a recording rule with the following fields:
@@ -43,7 +43,7 @@ Prometheus rule files are held in PrometheusRule custom resources. A PrometheusR
- Labels that should be attached to the alert or record that identify it (e.g. cluster name or severity)
- Annotations that encode any additional important pieces of information that need to be displayed on the notification for an alert (e.g. summary, description, message, runbook URL, etc.). This field is not required for recording rules.
For more information on what fields can be specified, please look at the [Prometheus Operator spec.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#prometheusrulespec)
For more information on what fields can be specified, please look at the [Prometheus Operator spec.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#prometheusrulespec)
Use the label selector field `ruleSelector` in the Prometheus object to define the rule files that you want to be mounted into Prometheus.
@@ -8,7 +8,7 @@ title: Monitoring Configuration Guides
This page captures some of the most important options for configuring Monitoring V2 in the Rancher UI.
For information on configuring custom scrape targets and rules for Prometheus, please refer to the upstream documentation for the [Prometheus Operator.](https://github.com/prometheus-operator/prometheus-operator) Some of the most important custom resources are explained in the Prometheus Operator [design documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md) The Prometheus Operator documentation can help also you set up RBAC, Thanos, or custom configuration.
For information on configuring custom scrape targets and rules for Prometheus, please refer to the upstream documentation for the [Prometheus Operator.](https://github.com/prometheus-operator/prometheus-operator) Some of the most important custom resources are explained in the Prometheus Operator [design documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md) The Prometheus Operator documentation can help also you set up RBAC, Thanos, or custom configuration.
## Setting Resource Limits and Requests
@@ -99,7 +99,7 @@ To see the Prometheus Targets, install `rancher-monitoring`. Then:
### Viewing the PrometheusRules
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive a certain Alert.
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive a certain Alert.
To see the PrometheusRules, install `rancher-monitoring`. Then:
@@ -85,7 +85,7 @@ A PrometheusRule allows you to define one or more RuleGroups. Each RuleGroup con
- Labels that should be attached to the alert or record that identify it (e.g. cluster name or severity)
- Annotations that encode any additional important pieces of information that need to be displayed on the notification for an alert (e.g. summary, description, message, runbook URL, etc.). This field is not required for recording rules.
Upon evaluating a [rule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#rule), Prometheus runs the provided PromQL query, adds the provided labels, and runs the appropriate action for the rule. If the rule triggers an alert, Prometheus also adds the provided annotations. For example, an Alerting Rule that adds `team: front-end` as a label to the provided PromQL query will append that label to the fired alert, which will allow Alertmanager to forward the alert to the correct Receiver.
Upon evaluating a [rule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule), Prometheus runs the provided PromQL query, adds the provided labels, and runs the appropriate action for the rule. If the rule triggers an alert, Prometheus also adds the provided annotations. For example, an Alerting Rule that adds `team: front-end` as a label to the provided PromQL query will append that label to the fired alert, which will allow Alertmanager to forward the alert to the correct Receiver.
### Alerting and Recording Rules
@@ -183,7 +183,7 @@ Refer to [Scraping Metrics with PushProx](#scraping-metrics-with-pushprox) for m
### Defining what Metrics are Scraped
ServiceMonitors and PodMonitors define targets that are intended for Prometheus to scrape. The [Prometheus custom resource](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md#prometheus) tells Prometheus which ServiceMonitors or PodMonitors it should use to find out where to scrape metrics from.
ServiceMonitors and PodMonitors define targets that are intended for Prometheus to scrape. The [Prometheus custom resource](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md#prometheus) tells Prometheus which ServiceMonitors or PodMonitors it should use to find out where to scrape metrics from.
The Prometheus Operator observes the ServiceMonitors and PodMonitors. When it observes that they are created or updated, it calls the Prometheus API to update the scrape configuration in the Prometheus custom resource and keep it in sync with the scrape configuration in the ServiceMonitors or PodMonitors. This scrape configuration tells Prometheus which endpoints to scrape metrics from and how it will label the metrics from those endpoints.
@@ -8,7 +8,7 @@ title: Monitoring Configuration Examples
## ServiceMonitor
See the official prometheus-operator GitHub repo for an example [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) YAML.
See the official prometheus-operator GitHub repo for an example [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) YAML.
## PodMonitor
@@ -46,7 +46,7 @@ The route needs to refer to a [receiver](./receivers.md) that has already been c
| Field | Default | Description |
|-------|--------------|---------|
| Group By | N/a | List of labels to group by. Labels must be unique. Special label "..." (aggregate by all possible labels), if provided, must be the only element in the list. Accepts a list of strings. See the [upstream documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#route) for details. |
| Group By | N/a | List of labels to group by. Labels must be unique. Special label "..." (aggregate by all possible labels), if provided, must be the only element in the list. Accepts a list of strings. See the [upstream documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#route) for details. |
| Group Wait | 30s | How long to wait to buffer alerts of the same group before sending initially. |
| Group Interval | 5m | How long to wait before sending an alert that has been added to a group of alerts for which an initial notification has already been sent. |
| Repeat Interval | 4h | How long to wait before re-sending a given alert that has already been sent. |
@@ -26,7 +26,7 @@ When a ServiceMonitor is created, the Prometheus Operator updates the Prometheus
Any Services in your cluster that match the labels located within the ServiceMonitor `selector` field will be monitored based on the `endpoints` specified on the ServiceMonitor. For more information on what fields can be specified, please look at the [spec](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#servicemonitor) provided by Prometheus Operator.
For more information about how ServiceMonitors work, refer to the [Prometheus Operator documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/running-exporters.md)
For more information about how ServiceMonitors work, refer to the [Prometheus Operator documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/running-exporters.md)
## PodMonitors
@@ -34,7 +34,7 @@ To create rule groups in the Rancher UI,
### About the PrometheusRule Custom Resource
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive this Alert. For example, an Alert with the label `team: front-end` will be sent to all Routes that match on that label.
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive this Alert. For example, an Alert with the label `team: front-end` will be sent to all Routes that match on that label.
Prometheus rule files are held in PrometheusRule custom resources. A PrometheusRule allows you to define one or more RuleGroups. Each RuleGroup consists of a set of Rule objects that can each represent either an alerting or a recording rule with the following fields:
@@ -43,7 +43,7 @@ Prometheus rule files are held in PrometheusRule custom resources. A PrometheusR
- Labels that should be attached to the alert or record that identify it (e.g. cluster name or severity)
- Annotations that encode any additional important pieces of information that need to be displayed on the notification for an alert (e.g. summary, description, message, runbook URL, etc.). This field is not required for recording rules.
For more information on what fields can be specified, please look at the [Prometheus Operator spec.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#prometheusrulespec)
For more information on what fields can be specified, please look at the [Prometheus Operator spec.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#prometheusrulespec)
Use the label selector field `ruleSelector` in the Prometheus object to define the rule files that you want to be mounted into Prometheus.
@@ -8,7 +8,7 @@ title: Monitoring Configuration Guides
This page captures some of the most important options for configuring Monitoring V2 in the Rancher UI.
For information on configuring custom scrape targets and rules for Prometheus, please refer to the upstream documentation for the [Prometheus Operator.](https://github.com/prometheus-operator/prometheus-operator) Some of the most important custom resources are explained in the Prometheus Operator [design documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md) The Prometheus Operator documentation can help also you set up RBAC, Thanos, or custom configuration.
For information on configuring custom scrape targets and rules for Prometheus, please refer to the upstream documentation for the [Prometheus Operator.](https://github.com/prometheus-operator/prometheus-operator) Some of the most important custom resources are explained in the Prometheus Operator [design documentation.](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md) The Prometheus Operator documentation can help also you set up RBAC, Thanos, or custom configuration.
## Setting Resource Limits and Requests
@@ -99,7 +99,7 @@ To see the Prometheus Targets, install `rancher-monitoring`. Then:
### Viewing the PrometheusRules
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive a certain Alert.
When you define a Rule (which is declared within a RuleGroup in a PrometheusRule resource), the [spec of the Rule itself](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule) contains labels that are used by Alertmanager to figure out which Route should receive a certain Alert.
To see the PrometheusRules, install `rancher-monitoring`. Then:
@@ -85,7 +85,7 @@ A PrometheusRule allows you to define one or more RuleGroups. Each RuleGroup con
- Labels that should be attached to the alert or record that identify it (e.g. cluster name or severity)
- Annotations that encode any additional important pieces of information that need to be displayed on the notification for an alert (e.g. summary, description, message, runbook URL, etc.). This field is not required for recording rules.
Upon evaluating a [rule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#rule), Prometheus runs the provided PromQL query, adds the provided labels, and runs the appropriate action for the rule. If the rule triggers an alert, Prometheus also adds the provided annotations. For example, an Alerting Rule that adds `team: front-end` as a label to the provided PromQL query will append that label to the fired alert, which will allow Alertmanager to forward the alert to the correct Receiver.
Upon evaluating a [rule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#rule), Prometheus runs the provided PromQL query, adds the provided labels, and runs the appropriate action for the rule. If the rule triggers an alert, Prometheus also adds the provided annotations. For example, an Alerting Rule that adds `team: front-end` as a label to the provided PromQL query will append that label to the fired alert, which will allow Alertmanager to forward the alert to the correct Receiver.
### Alerting and Recording Rules
@@ -183,7 +183,7 @@ Refer to [Scraping Metrics with PushProx](#scraping-metrics-with-pushprox) for m
### Defining what Metrics are Scraped
ServiceMonitors and PodMonitors define targets that are intended for Prometheus to scrape. The [Prometheus custom resource](https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/design.md#prometheus) tells Prometheus which ServiceMonitors or PodMonitors it should use to find out where to scrape metrics from.
ServiceMonitors and PodMonitors define targets that are intended for Prometheus to scrape. The [Prometheus custom resource](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/getting-started/design.md#prometheus) tells Prometheus which ServiceMonitors or PodMonitors it should use to find out where to scrape metrics from.
The Prometheus Operator observes the ServiceMonitors and PodMonitors. When it observes that they are created or updated, it calls the Prometheus API to update the scrape configuration in the Prometheus custom resource and keep it in sync with the scrape configuration in the ServiceMonitors or PodMonitors. This scrape configuration tells Prometheus which endpoints to scrape metrics from and how it will label the metrics from those endpoints.
@@ -8,7 +8,7 @@ title: Monitoring Configuration Examples
## ServiceMonitor
See the official prometheus-operator GitHub repo for an example [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) YAML.
See the official prometheus-operator GitHub repo for an example [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) YAML.
## PodMonitor
@@ -46,7 +46,7 @@ The route needs to refer to a [receiver](./receivers.md) that has already been c
| Field | Default | Description |
|-------|--------------|---------|
| Group By | N/a | List of labels to group by. All labels must be unique. Special label "..." (aggregate by all possible labels), if provided, must be the only element in the list. Accepts a list of strings. See the [upstream documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#route) for details. |
| Group By | N/a | List of labels to group by. All labels must be unique. Special label "..." (aggregate by all possible labels), if provided, must be the only element in the list. Accepts a list of strings. See the [upstream documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#route) for details. |
| Group Wait | 30s | How long to wait to buffer alerts of the same group before sending initially. |
| Group Interval | 5m | How long to wait before sending an alert that has been added to a group of alerts for which an initial notification has already been sent. |
| Repeat Interval | 4h | How long to wait before re-sending a given alert that has already been sent. |

Some files were not shown because too many files have changed in this diff Show More