-
Notifications
You must be signed in to change notification settings - Fork 309
Docs: reorganize and rewrite content #1894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
96a440d
e6945b4
1a00d80
6453e54
d26f620
2db9341
7909e2d
70ace66
8f447cd
a431002
a8178f7
a1cfef6
2fdd287
745ed97
7993d67
8fde0e5
ac04986
6e56877
5ef13d1
ce9512d
f629779
d98ce3c
1b8bb05
561561a
4f1004f
a1db1ba
3f8e030
9a5019c
84f0e22
290c683
2df3008
f791f03
5844956
747ebb8
65e2ec5
e30d065
5203fe7
c783202
883ae70
905881c
6505086
862e74e
382a929
af79123
9ed579a
608f0cb
9e8fd78
28629f2
52a6a79
a4725a0
c7a7fa4
ba0061d
825ef85
af986c0
d427502
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,63 +1,63 @@ | ||
| .. admonition:: AlertManager config for sending alerts to Robusta | ||
|
|
||
| .. tab-set:: | ||
|
|
||
| .. tab-item:: kube-prometheus-stack (Prometheus Operator) | ||
|
|
||
| Add the following to your `AlertManager's config Secret <https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/alerting.md#managing-alertmanager-configuration>`_ | ||
|
|
||
| Do not apply in other ways, they all `have limitations <https://github.com/prometheus-operator/prometheus-operator/issues/3750>`_ and won't forward all alerts. | ||
|
|
||
| .. code-block:: yaml | ||
|
|
||
| receivers: | ||
| - name: 'robusta' | ||
| webhook_configs: | ||
| - url: 'http://<helm-release-name>-runner.<namespace>.svc.cluster.local/api/alerts' | ||
| send_resolved: true # (3) | ||
| - name: 'default-receiver' | ||
|
|
||
| route: # (1) | ||
| routes: | ||
| - receiver: 'robusta' | ||
| group_by: [ '...' ] | ||
| group_wait: 1s | ||
| group_interval: 1s | ||
| matchers: | ||
| - severity =~ ".*" | ||
| repeat_interval: 4h | ||
| continue: true # (2) | ||
| receiver: 'default-receiver' | ||
|
|
||
| .. code-annotations:: | ||
| 1. Put Robusta's route as the first route, to guarantee it receives alerts. If you can't do so, you must guarantee all previous routes set ``continue: true`` set. | ||
| 2. Keep sending alerts to receivers defined after Robusta. | ||
| 3. Important, so Robusta knows when alerts are resolved. | ||
|
|
||
| .. tab-item:: Other Prometheus Installations | ||
|
|
||
| Add the following to your AlertManager configuration, wherever it is defined. | ||
|
|
||
| .. code-block:: yaml | ||
|
|
||
| receivers: | ||
| - name: 'robusta' | ||
| webhook_configs: | ||
| - url: 'http://<helm-release-name>-runner.<namespace>.svc.cluster.local/api/alerts' | ||
| send_resolved: true # (3) | ||
|
|
||
| route: # (1) | ||
| routes: | ||
| - receiver: 'robusta' | ||
| group_by: [ '...' ] | ||
| group_wait: 1s | ||
| group_interval: 1s | ||
| matchers: | ||
| - severity =~ ".*" | ||
| repeat_interval: 4h | ||
| continue: true # (2) | ||
|
|
||
| .. code-annotations:: | ||
| 1. Put Robusta's route as the first route, to guarantee it receives alerts. If you can't do so, you must guarantee all previous routes set ``continue: true`` set. | ||
| 2. Keep sending alerts to receivers defined after Robusta. | ||
| 3. Important, so Robusta knows when alerts are resolved. | ||
| Configure your AlertManager to send alerts to Robusta: | ||
|
|
||
| .. tab-set:: | ||
|
|
||
| .. tab-item:: kube-prometheus-stack (Prometheus Operator) | ||
|
|
||
| Add the following to your `AlertManager's config Secret <https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/alerting.md#managing-alertmanager-configuration>`_. | ||
|
|
||
| Do not apply in other ways, they all `have limitations <https://github.com/prometheus-operator/prometheus-operator/issues/3750>`_ and won't forward all alerts. | ||
|
|
||
| .. code-block:: yaml | ||
|
|
||
| receivers: | ||
| - name: 'robusta' | ||
| webhook_configs: | ||
| - url: 'http://<helm-release-name>-runner.<namespace>.svc.cluster.local/api/alerts' | ||
| send_resolved: true # (3) | ||
| - name: 'default-receiver' | ||
|
|
||
| route: # (1) | ||
| routes: | ||
| - receiver: 'robusta' | ||
| group_by: [ '...' ] | ||
| group_wait: 1s | ||
| group_interval: 1s | ||
| matchers: | ||
| - severity =~ ".*" | ||
| repeat_interval: 4h | ||
| continue: true # (2) | ||
| receiver: 'default-receiver' | ||
|
|
||
| .. code-annotations:: | ||
| 1. Put Robusta's route as the first route, to guarantee it receives alerts. If you can't do so, you must guarantee all previous routes set ``continue: true``. | ||
| 2. Keep sending alerts to receivers defined after Robusta. | ||
| 3. Important, so Robusta knows when alerts are resolved. | ||
|
|
||
| .. tab-item:: Other Prometheus Installations | ||
|
|
||
| Add the following to your AlertManager configuration, wherever it is defined. | ||
|
|
||
| .. code-block:: yaml | ||
|
|
||
| receivers: | ||
| - name: 'robusta' | ||
| webhook_configs: | ||
| - url: 'http://<helm-release-name>-runner.<namespace>.svc.cluster.local/api/alerts' | ||
| send_resolved: true # (3) | ||
|
|
||
| route: # (1) | ||
| routes: | ||
| - receiver: 'robusta' | ||
| group_by: [ '...' ] | ||
| group_wait: 1s | ||
| group_interval: 1s | ||
| matchers: | ||
| - severity =~ ".*" | ||
| repeat_interval: 4h | ||
| continue: true # (2) | ||
|
|
||
| .. code-annotations:: | ||
| 1. Put Robusta's route as the first route, to guarantee it receives alerts. If you can't do so, you must guarantee all previous routes set ``continue: true``. | ||
| 2. Keep sending alerts to receivers defined after Robusta. | ||
| 3. Important, so Robusta knows when alerts are resolved. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,8 @@ | ||
|
|
||
| Robusta utilizes the flags API to retrieve data from Prometheus-style metric stores. However, some platforms like Google Managed Prometheus, Azure Managed Prometheus etc, do not implement the flags API. | ||
|
|
||
| You can disable the Prometheus flags API check by setting the following option to ``false``. | ||
| You can disable the Prometheus flags API check by setting the following option to false. | ||
|
|
||
| .. code-block:: yaml | ||
|
|
||
| globalConfig: | ||
| check_prometheus_flags: true/false | ||
| globalConfig: | ||
| check_prometheus_flags: true/false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,81 +1,10 @@ | ||
| Configure Metric Querying | ||
| ==================================== | ||
|
|
||
| Metrics querying lets Robusta pull metrics and create silences. | ||
| To enable Robusta to pull metrics and create silences, you need to configure Prometheus and AlertManager URLs. | ||
|
|
||
| If Robusta fails to auto-detect the Prometheus and Alertmanager urls - and you see related connection errors in the logs - configure the ``prometheus_url`` and ``alertmanager_url`` in your Helm values and :ref:`update Robusta <Simple Upgrade>` | ||
| See :doc:`Prometheus and metrics configuration </configuration/metric-providers-in-cluster>` for detailed instructions. | ||
|
|
||
| .. code-block:: yaml | ||
| .. note:: | ||
|
|
||
| globalConfig: # This line should already exist | ||
| # Add the lines below | ||
| alertmanager_url: "http://ALERT_MANAGER_SERVICE_NAME.NAMESPACE.svc.cluster.local:9093" # (1) | ||
| prometheus_url: "http://PROMETHEUS_SERVICE_NAME.NAMESPACE.svc.cluster.local:9090" # (2) | ||
|
|
||
| # If Prometheus has data for multiple clusters, tell Robusta how to query data for this cluster only | ||
| # prometheus_additional_labels: | ||
| # cluster: 'CLUSTER_NAME_HERE' | ||
|
|
||
| # If using Grafana alerts, add this too | ||
| # grafana_api_key: <YOUR GRAFANA EDITOR API KEY> # (3) | ||
| # alertmanager_flavor: grafana | ||
|
|
||
| # If necessary, see docs below | ||
| # prometheus_auth: ... | ||
| # alertmanager_auth: ... | ||
|
|
||
| # If using a multi-tenant prometheus or alertmanager, pass the org id to all queries | ||
| # prometheus_additional_headers: | ||
| # X-Scope-OrgID: <org id> | ||
| # alertmanager_additional_headers: | ||
| # X-Scope-OrgID: <org id> | ||
|
|
||
| .. code-annotations:: | ||
| 1. Example: http://alertmanager-Helm_release_name-kube-prometheus-alertmanager.default.svc.cluster.local:9093. | ||
| 2. Example: http://Helm_Release_Name-kube-prometheus-prometheus.default.svc.cluster.local:9090 | ||
| 3. This is necessary for Robusta to create silences when using Grafana Alerts, because of minor API differences in the AlertManager embedded in Grafana. | ||
|
|
||
| You can optionally setup authentication, SSL verification, and other parameters described below. | ||
|
|
||
| Verify it Works | ||
| ^^^^^^^^^^^^^^^^^ | ||
| Open any application in the Robusta UI. If CPU and memory graphs are shown, everything is working. | ||
|
|
||
| If you don't use the Robusta UI, trigger a `demo OOMKill alert <https://github.com/robusta-dev/kubernetes-demos/#oomkilled-pod-out-of-memory-kill>`_, | ||
| and verify that Robusta sends a Slack/Teams message with a memory graph included. If so, everything is configured properly. | ||
|
|
||
| Optional Settings | ||
| ============================= | ||
|
|
||
| Authentication Headers | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| If Prometheus and/or AlertManager require authentication, add the following to ``generated_values.yaml``: | ||
|
|
||
| .. code-block:: yaml | ||
|
|
||
| globalConfig: | ||
| prometheus_auth: Bearer <YOUR TOKEN> # Replace <YOUR TOKEN> with your actual token or use any other auth header as needed | ||
| alertmanager_auth: Basic <USER:PASSWORD base64-encoded> # Replace <USER:PASSWORD base64-encoded> with your actual credentials, base64-encoded, or use any other auth header as needed | ||
|
|
||
| These settings may be configured independently. | ||
|
|
||
| SSL Verification | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
| By default, Robusta does not verify the SSL certificate of the Prometheus server. | ||
|
|
||
| To enable SSL verification, add the following to Robusta's ``generated_values.yaml``: | ||
|
|
||
| .. code-block:: yaml | ||
|
|
||
| runner: | ||
| additional_env_vars: | ||
| - name: PROMETHEUS_SSL_ENABLED | ||
| value: "true" | ||
|
|
||
| If you have a custom Certificate Authority (CA) certificate, add one more setting: | ||
|
|
||
| .. code-block:: yaml | ||
|
|
||
| runner: | ||
| certificate: "<YOUR BASE-64 ENCODED DATA>" # base64-encoded certificate value | ||
| Robusta will attempt to auto-detect Prometheus and AlertManager URLs in your cluster. Manual configuration is only needed if auto-detection fails. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,4 +56,4 @@ If everything is setup properly, this alert will reach Robusta. It will show up | |
|
|
||
| Robusta enriches alerts with Kubernetes and log data using Prometheus labels for mapping. | ||
| Standard label names are used by default. If your setup differs, you can | ||
| :ref:`customize this mapping <Relabel Prometheus Alerts>` to fit your environment. | ||
| `customize this mapping </setup-robusta/additional-settings.html#alert-label-mapping>`_ to fit your environment. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainAvoid hard-coded .html paths for internal docs; use Sphinx refs Root-absolute HTML links are brittle across builders and hosting paths. Prefer a Sphinx cross-ref to the labeled section instead. Proposed change: - `customize this mapping </setup-robusta/additional-settings.html#alert-label-mapping>`_ to fit your environment.
+ :ref:`customize this mapping <alert-label-mapping>` to fit your environment.Run this to verify the target label exists: 🏁 Script executed: #!/bin/bash
# Verify the 'alert-label-mapping' target exists somewhere in the docs
rg -n --no-heading $'(^\\s*\\.\\.\\s*_alert-label-mapping:\\s*$)|(^\\s*\\.{1,2}\\s+_?alert-label-mapping:)'
# Also check the referenced file exists (if you keep the direct link)
fd -a additional-settings.rst | sed 's/^/FILE: /'Length of output: 220 🏁 Script executed: #!/bin/bash
# Search for section heading 'Alert Label Mapping'
rg -n 'alert label mapping' -i docs/setup-robusta/additional-settings.rst -C2
# Search for any heading 'Label Mapping'
rg -n 'label mapping' -i docs/setup-robusta/additional-settings.rst -C2
# Search for explicit Sphinx label definition for 'alert-label-mapping'
rg -n '\.\.\s*_?alert-label-mapping' -in docs/setup-robusta/additional-settings.rst -C2Length of output: 243 🏁 Script executed: #!/bin/bash
# Search for any existing Sphinx labels in the file
rg -n '^.. _' docs/setup-robusta/additional-settings.rst -C1
# Search for any occurrences of 'mapping' to locate the section heading
rg -n 'mapping' docs/setup-robusta/additional-settings.rst -C3
# Search for RST section headings pattern (text underlined by =, -, ~, etc.)
rg -n -P '^[^\n]+\n[=\\-~`^"+]{3,}$' docs/setup-robusta/additional-settings.rst -A1Length of output: 829 Use a Sphinx cross‐reference instead of a hard-coded HTML link Hard-coded • In docs/setup-robusta/additional-settings.rst, add a label above the section where you explain alert label mapping (around line 57): .. _alert-label-mapping:
If your alerts have different labels, you can change the mapping with the ``alertRelabel`` helm value.• In docs/configuration/alertmanager-integration/_testing_integration.rst, replace the HTML link: - `customize this mapping </setup-robusta/additional-settings.html#alert-label-mapping>`_
+ :ref:`customize this mapping <alert-label-mapping>`This ensures the internal link remains valid even if the output path changes. 🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Cross-link to AlertManager send-to-Robusta config and verify doc target
The minimal guidance is good. Two follow-ups:
Proposed tweak:
Validate the targets exist:
🏁 Script executed:
Length of output: 230
Add cross-link to AlertManager send-to-Robusta guide and verify targets
Both doc targets exist under
docs/configuration:metric-providers-in-cluster.rstalertmanager-integration/_alertmanager-config.rstApply this diff in
docs/configuration/alertmanager-integration/_pull_integration.rst:📝 Committable suggestion
🤖 Prompt for AI Agents