You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration/alertmanager-integration/coralogix_managed_prometheus.rst
+68-10Lines changed: 68 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,10 @@ Send Alerts to Robusta
10
10
11
11
This integration lets you send Coralogix alerts to Robusta.
12
12
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
+
-----------------------------------------
14
17
15
18
1. In the Coralogix site go to Data Flow, then Outbound Webhooks, and click ``Generic webhook``.
16
19
2. In the url insert:
@@ -22,34 +25,45 @@ To configure it:
22
25
3. Select the Post Method.
23
26
4. In the Edit headers replace it with
24
27
25
-
.. code-block:: yaml
28
+
.. code-block:: json
26
29
27
30
{
28
31
"Content-Type": "application/json",
29
32
"Authorization": "Bearer <TOKEN>"# where token is '<ACCOUNT_ID> <SIGNING_KEY>'
30
33
}
31
34
32
-
5. In Edit body add
33
35
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
35
43
36
44
{
37
45
"externalURL": "",
38
-
"groupKey": "{}/{}:{}",
46
+
"groupKey": "coralogix/alert:${ALERT_ID}",
39
47
"version": "1",
40
48
"status": "firing",
41
49
"receiver": "robusta receiver",
42
50
"alerts": [
43
51
{
44
-
"description": "$ALERT_DESCRIPTION",
45
52
"status": "firing",
46
-
"endsAt": "$EVENT_TIMESTAMP_MS",
47
-
"startsAt": "$EVENT_TIMESTAMP_MS",
53
+
"startsAt": "$EVENT_TIMESTAMP_ISO",
54
+
"endsAt": "1970-01-01T00:00:00Z",
48
55
"generatorURL": "$ALERT_URL",
56
+
"source": "Coralogix",
57
+
"description": "$ALERT_DESCRIPTION",
58
+
"fingerprint": "$ALERT_UNIQUE_IDENTIFIER",
49
59
"annotations": {},
50
60
"labels": {
51
61
"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
52
62
"alertname": "$ALERT_NAME",
63
+
"severity": "$EVENT_SEVERITY",
64
+
"application": "$APPLICATION_NAME",
65
+
"subsystem": "$SUBSYSTEM_NAME",
66
+
"team": "$TEAM_NAME",
53
67
"alert_url": "$ALERT_URL"
54
68
# Add any additional alert specific fields here
55
69
# see here for more parameters https://coralogix.com/docs/alert-webhooks/#custom-alert-webhooks
@@ -58,9 +72,53 @@ To configure it:
58
72
]
59
73
}
60
74
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
61
118
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>`_.
0 commit comments