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
+66-10Lines changed: 66 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,44 @@ 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. For the firing alerts webhook, in Edit body add:
40
+
41
+
.. code-block:: json
35
42
36
43
{
37
44
"externalURL": "",
38
-
"groupKey": "{}/{}:{}",
45
+
"groupKey": "coralogix/alert:${ALERT_ID}",
39
46
"version": "1",
40
47
"status": "firing",
41
48
"receiver": "robusta receiver",
42
49
"alerts": [
43
50
{
44
-
"description": "$ALERT_DESCRIPTION",
45
51
"status": "firing",
46
-
"endsAt": "$EVENT_TIMESTAMP_MS",
47
-
"startsAt": "$EVENT_TIMESTAMP_MS",
52
+
"startsAt": "$EVENT_TIMESTAMP_ISO",
53
+
"endsAt": "1970-01-01T00:00:00Z",
48
54
"generatorURL": "$ALERT_URL",
55
+
"source": "Coralogix",
56
+
"description": "$ALERT_DESCRIPTION",
57
+
"fingerprint": "$ALERT_UNIQUE_IDENTIFIER",
49
58
"annotations": {},
50
59
"labels": {
51
60
"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
61
"alertname": "$ALERT_NAME",
62
+
"severity": "$EVENT_SEVERITY",
63
+
"application": "$APPLICATION_NAME",
64
+
"subsystem": "$SUBSYSTEM_NAME",
65
+
"team": "$TEAM_NAME",
53
66
"alert_url": "$ALERT_URL"
54
67
# Add any additional alert specific fields here
55
68
# see here for more parameters https://coralogix.com/docs/alert-webhooks/#custom-alert-webhooks
@@ -58,10 +71,53 @@ To configure it:
58
71
]
59
72
}
60
73
61
-
62
-
6. Click the 'Test Config' button and check your robusta sink for a "Test configuration" alert.
74
+
6. Click the 'Test Config' button and check your robusta sink for a "Test configuration" alert.
63
75
7. Click Save
64
76
77
+
Resolved Alerts Webhook
78
+
-----------------------
79
+
80
+
8. Create a second webhook following steps 1-4 above with the same URL and headers.
81
+
9. For the resolved alerts webhook, in Edit body add:
82
+
83
+
.. code-block:: json
84
+
85
+
{
86
+
"externalURL": "",
87
+
"groupKey": "coralogix/alert:${ALERT_ID}",
88
+
"version": "1",
89
+
"status": "resolved",
90
+
"receiver": "robusta receiver",
91
+
"alerts": [
92
+
{
93
+
"status": "resolved",
94
+
"startsAt": "$EVENT_TIMESTAMP_ISO",
95
+
"endsAt": "$EVENT_TIMESTAMP_ISO",
96
+
"generatorURL": "$ALERT_URL",
97
+
"source": "Coralogix",
98
+
"description": "$ALERT_DESCRIPTION",
99
+
"fingerprint": "$ALERT_UNIQUE_IDENTIFIER",
100
+
"annotations": {},
101
+
"labels": {
102
+
"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
103
+
"alertname": "$ALERT_NAME",
104
+
"severity": "$EVENT_SEVERITY",
105
+
"application": "$APPLICATION_NAME",
106
+
"subsystem": "$SUBSYSTEM_NAME",
107
+
"team": "$TEAM_NAME",
108
+
"alert_url": "$ALERT_URL"
109
+
}
110
+
}
111
+
]
112
+
}
113
+
114
+
10. Click the 'Test Config' button and check your robusta sink for a "Test configuration" alert.
115
+
11. Click Save
116
+
117
+
.. note::
118
+
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.
119
+
For more parameters, see `Coralogix alert webhooks documentation <https://coralogix.com/docs/alert-webhooks/#custom-alert-webhooks>`_.
0 commit comments