URL scheme for alert integrations
Problem
Currently, the following endpoint URLs we are exposed to users in the "Alert endpoint" integration:
- "Generic endpoint" with
alerts/notify.json
- "External Prometheus endpoint" with
prometheus/alerts/notify.json
We need to settle on a stable URL scheme so we can support more integration monintoring_tools while taking the burden from users of changing their integrations with GitLab frequently.
Proposed solution
#214035 (comment 336293054) and #217766 (comment 346943906) already mentioned URL schemes to extend the current "Generic endpoint".
Example DataDog
(or data_dog
). To summarize the options we have:
#214035 (comment 336293054) suggests:
alerts/notify/data_dog.json
alerts/notify.json?monitoring_tool=data_dog
#217766 (comment 346943906) adds the version aspect (e.g. v1
) to it:
alerts/notify/v1/data_dog.json
alerts/notify.json?monitoring_tool=data_dog&version=v1
#217766 (comment 346943906) brings up an interesting idea to create an id (e.g. 30a99a9c784
) instead of using the name/version.
alerts/notify/30a99a9c784.json
(adjusted version)
alerts/notify.json?id=30a99a9c784
#223778 (comment 373349952) combines option 3 + 5
alerts/notify/datadog_v1/30a99a9c784.json
alerts/notify.json?id=30a99a9c784&name=datadog_v1
All odd (1, 3, 5, and 7) options use different URLs while the even (2, 4, 6, and 8) options pass the information as query parameters.
Solution
As summarized in #223778 (comment 373349952) we going to implement
alerts/notify/datadog_v1/30a99a9c784.json