Skip to content

Commit 8419c1c

Browse files
authored
[ROB-2580] Coralogix docs updated (#1963)
* update docs * docs fix
1 parent 82edbfe commit 8419c1c

File tree

1 file changed

+68
-10
lines changed

1 file changed

+68
-10
lines changed

docs/configuration/alertmanager-integration/coralogix_managed_prometheus.rst

Lines changed: 68 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ Send Alerts to Robusta
1010

1111
This integration lets you send Coralogix alerts to Robusta.
1212

13-
To configure it:
13+
You need to create two webhooks: one for firing alerts and one for resolved alerts.
14+
15+
Common Configuration (for both webhooks)
16+
-----------------------------------------
1417

1518
1. In the Coralogix site go to Data Flow, then Outbound Webhooks, and click ``Generic webhook``.
1619
2. In the url insert:
@@ -22,34 +25,45 @@ To configure it:
2225
3. Select the Post Method.
2326
4. In the Edit headers replace it with
2427

25-
.. code-block:: yaml
28+
.. code-block:: json
2629
2730
{
2831
"Content-Type": "application/json",
2932
"Authorization": "Bearer <TOKEN>" # where token is '<ACCOUNT_ID> <SIGNING_KEY>'
3033
}
3134
32-
5. In Edit body add
3335
34-
.. code-block:: yaml
36+
Firing Alerts Webhook
37+
---------------------
38+
39+
5. Configure this webhook to trigger on **firing** alerts (when alerts are triggered/started).
40+
6. For the firing alerts webhook, in Edit body add:
41+
42+
.. code-block:: json
3543
3644
{
3745
"externalURL": "",
38-
"groupKey": "{}/{}:{}",
46+
"groupKey": "coralogix/alert:${ALERT_ID}",
3947
"version": "1",
4048
"status": "firing",
4149
"receiver": "robusta receiver",
4250
"alerts": [
4351
{
44-
"description": "$ALERT_DESCRIPTION",
4552
"status": "firing",
46-
"endsAt": "$EVENT_TIMESTAMP_MS",
47-
"startsAt": "$EVENT_TIMESTAMP_MS",
53+
"startsAt": "$EVENT_TIMESTAMP_ISO",
54+
"endsAt": "1970-01-01T00:00:00Z",
4855
"generatorURL": "$ALERT_URL",
56+
"source": "Coralogix",
57+
"description": "$ALERT_DESCRIPTION",
58+
"fingerprint": "$ALERT_UNIQUE_IDENTIFIER",
4959
"annotations": {},
5060
"labels": {
5161
"cluster_name": "MY_CLUSTER_NAME", # make sure to add your cluster name here for this webhook. Both "cluster" or "cluster_name" labels are also supported
5262
"alertname": "$ALERT_NAME",
63+
"severity": "$EVENT_SEVERITY",
64+
"application": "$APPLICATION_NAME",
65+
"subsystem": "$SUBSYSTEM_NAME",
66+
"team": "$TEAM_NAME",
5367
"alert_url": "$ALERT_URL"
5468
# Add any additional alert specific fields here
5569
# see here for more parameters https://coralogix.com/docs/alert-webhooks/#custom-alert-webhooks
@@ -58,9 +72,53 @@ To configure it:
5872
]
5973
}
6074
75+
7. Click the 'Test Config' button and check your robusta sink for a "Test configuration" alert.
76+
8. Click Save
77+
78+
Resolved Alerts Webhook
79+
-----------------------
80+
81+
9. Create a second webhook following steps 1-4 above with the same URL and headers.
82+
10. Configure this webhook to trigger on **resolved** alerts (when alerts are resolved/ended).
83+
11. For the resolved alerts webhook, in Edit body add:
84+
85+
.. code-block:: json
86+
87+
{
88+
"externalURL": "",
89+
"groupKey": "coralogix/alert:${ALERT_ID}",
90+
"version": "1",
91+
"status": "resolved",
92+
"receiver": "robusta receiver",
93+
"alerts": [
94+
{
95+
"status": "resolved",
96+
"startsAt": "$EVENT_TIMESTAMP_ISO",
97+
"endsAt": "$EVENT_TIMESTAMP_ISO",
98+
"generatorURL": "$ALERT_URL",
99+
"source": "Coralogix",
100+
"description": "$ALERT_DESCRIPTION",
101+
"fingerprint": "$ALERT_UNIQUE_IDENTIFIER",
102+
"annotations": {},
103+
"labels": {
104+
"cluster_name": "MY_CLUSTER_NAME", # make sure to add your cluster name here for this webhook. Both "cluster" or "cluster_name" labels are also supported
105+
"alertname": "$ALERT_NAME",
106+
"severity": "$EVENT_SEVERITY",
107+
"application": "$APPLICATION_NAME",
108+
"subsystem": "$SUBSYSTEM_NAME",
109+
"team": "$TEAM_NAME",
110+
"alert_url": "$ALERT_URL"
111+
}
112+
}
113+
]
114+
}
115+
116+
12. Click the 'Test Config' button and check your robusta sink for a "Test configuration" alert.
117+
13. Click Save
61118

62-
6. Click the 'Test Config' button and check your robusta sink for a "Test configuration" alert.
63-
7. Click Save
119+
.. note::
120+
Make sure to update the ``cluster_name`` value in both webhook bodies to match your cluster name. Both "cluster" or "cluster_name" labels are also supported.
121+
For more parameters, see `Coralogix alert webhooks documentation <https://coralogix.com/docs/alert-webhooks/#custom-alert-webhooks>`_.
64122

65123

66124
Configure Metric Querying

0 commit comments

Comments
 (0)