Skip to content

Commit dfc97f6

Browse files
Update VM docs and also testing docs (#1807)
* Update VM docs and also testing docs * Updated details about auto detection * Fixed based on comments * Minor text fix --------- Co-authored-by: Pavan Gudiwada <pavangudiwada@users.noreply.github.com> Co-authored-by: arik <alon.arik@gmail.com>
1 parent 808d455 commit dfc97f6

4 files changed

Lines changed: 63 additions & 10 deletions

File tree

docs/configuration/alertmanager-integration/_testing_integration.rst

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,43 @@ Verify it Works
33

44
Send a dummy alert to AlertManager:
55

6-
.. code-block:: bash
6+
.. tab-set::
77

8-
robusta demo-alert
8+
.. tab-item:: Robusta CLI
9+
10+
If you have the Robusta CLI installed, you can send a test alert using the following command:
11+
12+
.. code-block:: bash
13+
14+
robusta demo-alert
15+
16+
.. tab-item:: Robusta UI
17+
18+
In the Robusta UI, go to the "Clusters" tab, choose the right cluster and click "Simulate Alert".
19+
20+
.. image:: /images/robusta-ui-simulate-alert-1.png
21+
:alt: Choose the cluster
22+
:width: 900
23+
:align: center
24+
25+
Then
26+
27+
1. Check **Send alert with no resource**.
28+
2. Provide a name for the alert in the **Alert name (identifier)** field (e.g., "Testing Prod AlertManager").
29+
3. Select **Alert Manager** under the "Send alert to" section.
30+
4. Click the **Simulate Alert** button to send the test alert.
31+
32+
.. image:: /images/robusta-ui-simulate-alert-2.png
33+
:alt: Send Test Alert
34+
:width: 600
35+
:align: center
936

1037
If everything is setup properly, this alert will reach Robusta. It will show up in the Robusta UI, Slack, and other configured sinks.
1138

39+
.. note::
40+
41+
It might take a few minutes for the alert to arrive due to AlertManager's `group_wait` and `group_interval` settings. More info `here <https://prometheus.io/docs/alerting/latest/configuration/#:~:text=How%20long%20to%20wait%20before%20sending%20a%20notification%20about%20new%20alerts%20that%0A%23%20are%20added%20to%20a%20group%20of%20alerts%20for%20which%20an%20initial%20notification%20has%0A%23%20already%20been%20sent>`_.
42+
1243
.. details:: I configured AlertManager, but I'm not receiving alerts?
1344
:class: warning
1445

docs/configuration/alertmanager-integration/victoria-metrics.rst

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,48 @@ You will need to configure two integrations: one to send alerts to Robusta and a
88
Send Alerts to Robusta
99
============================
1010

11-
To configure, edit AlertManager's configuration:
11+
Add the following to your Victoria Metrics Alertmanager configuration (e.g., Helm values file or VMAlertmanagerConfig CRD):
12+
13+
.. code-block:: yaml
14+
15+
receivers:
16+
- name: 'robusta'
17+
webhook_configs:
18+
- url: 'http://<ROBUSTA-HELM-RELEASE-NAME>-runner.<NAMESPACE>.svc.cluster.local/api/alerts'
19+
send_resolved: true # (3)
20+
21+
route: # (1)
22+
routes:
23+
- receiver: 'robusta'
24+
group_by: [ '...' ]
25+
group_wait: 1s
26+
group_interval: 1s
27+
matchers:
28+
- severity =~ ".*"
29+
repeat_interval: 4h
30+
continue: true # (2)
31+
32+
.. code-annotations::
33+
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 has ``continue: true`` set.
34+
2. Keep sending alerts to receivers defined after Robusta.
35+
3. Important, so Robusta knows when alerts are resolved.
1236

13-
.. include:: ./_alertmanager-config.rst
1437

1538
.. include:: ./_testing_integration.rst
1639

17-
Configure Metric Querying
40+
Configure Metrics Querying
1841
====================================
1942

20-
Metrics querying lets Robusta pull metrics and create silences.
43+
Robusta can query metrics and create silences using Victoria Metrics. If both are in the same Kubernetes cluster, Robusta can auto-detect the Victoria Metrics service. To verify, go to the "Apps" tab in Robusta, select an application, and check for usage graphs.
2144

22-
Add the following to ``generated_values.yaml`` and :ref:`update Robusta <Simple Upgrade>`.
45+
If auto-detection fails you must add the ``prometheus_url`` parameter and :ref:`update Robusta <Simple Upgrade>`.
2346

2447
.. code-block:: yaml
2548
2649
globalConfig: # this line should already exist
2750
# add the lines below
28-
alertmanager_url: "http://ALERT_MANAGER_SERVICE_NAME.NAMESPACE.svc.cluster.local:9093"
29-
grafana_url: ""
30-
prometheus_url: "http://VICTORIA_METRICS_SERVICE_NAME.NAMESPACE.svc.cluster.local:8429"
51+
alertmanager_url: "http://<VM_ALERT_MANAGER_SERVICE_NAME>.<NAMESPACE>.svc.cluster.local:9093" # Example:"http://vmalertmanager-victoria-metrics-vm.default.svc.cluster.local:9093/"
52+
prometheus_url: "http://VM_Metrics_SERVICE_NAME.NAMESPACE.svc.cluster.local:8429" # Example:"http://vmsingle-vmks-victoria-metrics-k8s-stack.default.svc.cluster.local:8429"
3153
# Add any labels that are relevant to the specific cluster (optional)
3254
# prometheus_additional_labels:
3355
# cluster: 'CLUSTER_NAME_HERE'
216 KB
Loading
236 KB
Loading

0 commit comments

Comments
 (0)