Hi,
I am having trouble using the Alert management API on a community edition, self-managed instance (I am not the admin). In order to test it, I would like to just send a basic event, however, every new alerts are named with title "New: Alert"
, and other fields are empty (except the current time for start_date).
I looked into the documentation about customizing the alert payload outside of gitlab, but it does not seem to work.
Problem to solve
Describe your question in as much detail as possible:
The value in the json values are not mapped. The content does not seem to be parsed correctly.
- What are you seeing, and how does that differ from what you expect to see?
A new alert, with title “New: Alert” and every fields are empty except the date which is the time when the event is sent.
Steps to reproduce
Here is an example of my test alert using curl directly:
curl -X POST -H "Authorization: Bearer xxxbearerxxx" --data '{
"title": "This is a test incident",
"description": "Short description of the incident using authorization Bearer",
"start_time": "2024-09-23T14:38:55Z",
"service": "service xxx affected",
"monitoring_tool": "value",
"hosts": "value",
"severity": "high",
"fingerprint": "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
"foo": {
"bar": {
"baz": 42
}
}
}' "https://<gitlab-ce>/<repo-path>/notify/myendpoint/zzzzzzxxxxxxxxx.json"
I tried to change the json content and load it into an encapsulated "events": {[ <json-data> ]}
, but it does not work either. I also tried to set a gitlab_environment_name
value with an existing newly environment without success.
Versions
- Self-managed
Versions
- v17.2.7 ce
Thanks,
Best regards,
Rémy