Skip to content

Commit 9c5719c

Browse files
committed
update docs
1 parent 82edbfe commit 9c5719c

File tree

1 file changed

+66
-10
lines changed

1 file changed

+66
-10
lines changed

docs/configuration/alertmanager-integration/coralogix_managed_prometheus.rst

Lines changed: 66 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,44 @@ 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. For the firing alerts webhook, in Edit body add:
40+
41+
.. code-block:: json
3542
3643
{
3744
"externalURL": "",
38-
"groupKey": "{}/{}:{}",
45+
"groupKey": "coralogix/alert:${ALERT_ID}",
3946
"version": "1",
4047
"status": "firing",
4148
"receiver": "robusta receiver",
4249
"alerts": [
4350
{
44-
"description": "$ALERT_DESCRIPTION",
4551
"status": "firing",
46-
"endsAt": "$EVENT_TIMESTAMP_MS",
47-
"startsAt": "$EVENT_TIMESTAMP_MS",
52+
"startsAt": "$EVENT_TIMESTAMP_ISO",
53+
"endsAt": "1970-01-01T00:00:00Z",
4854
"generatorURL": "$ALERT_URL",
55+
"source": "Coralogix",
56+
"description": "$ALERT_DESCRIPTION",
57+
"fingerprint": "$ALERT_UNIQUE_IDENTIFIER",
4958
"annotations": {},
5059
"labels": {
5160
"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
5261
"alertname": "$ALERT_NAME",
62+
"severity": "$EVENT_SEVERITY",
63+
"application": "$APPLICATION_NAME",
64+
"subsystem": "$SUBSYSTEM_NAME",
65+
"team": "$TEAM_NAME",
5366
"alert_url": "$ALERT_URL"
5467
# Add any additional alert specific fields here
5568
# see here for more parameters https://coralogix.com/docs/alert-webhooks/#custom-alert-webhooks
@@ -58,10 +71,53 @@ To configure it:
5871
]
5972
}
6073
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.
6375
7. Click Save
6476

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>`_.
120+
65121

66122
Configure Metric Querying
67123
==============================

0 commit comments

Comments
 (0)