-
What Grafana version and what operating system are you using?
v9.0.2 -
What are you trying to achieve?
My Notification Policy is corrupted so I would like to delete it and start from scratch. -
How are you trying to achieve it?
Via Alert Provisioning API -
What happened?
I have create successfully a Notification Policy using the following API:
https://grafana-server/api/v1/provisioning/policies
Using PUT and the following body:
{
"receiver": "My Alert Contact"
}
I then tried to update the Notification Policy above by using the same API but with a slightly different body:
{
"receiver": "My Alert Contact",
"continue": true
}
The above caused a major disaster because now:
-
in the Grafana Web UI I get the following error: Error loading Alertmanager config
failed to unmarshal alertmanager configuration: unable to parse Alertmanager configuration: cannot have continue in root route -
I don’t know how to delete or update the incorrectly created Notification Policy: everything I’ve tried came back with the following error:
{
"message": "failed to deserialize alertmanager configuration: cannot have continue in root route",
"traceID": "00000000000000000000000000000000"
}
In order to fix the corrupted Notication Policy I’ve tried to send:
{
"receiver": "My Alert Contact",
"continue":false
}
and then:
{
"receiver": "My Alert Contact",
"continue":null
}
finally I’ve re-tried the original command, but it no longer works either:
{
"receiver": "My Alert Contact"
}
- Did you follow any online instructions? If so, what is the URL?
Yes, I looked at: Alerting Provisioning HTTP API | Grafana documentation