We are getting to grips with alerting so from time to time need to clear out old alerts which we did by calling the HTTP API, to remove the pseudo time series where the alerts were stored, e.g.:
DELETE https://prometheus/api/v1/series?match[]={__name__="ALERTS"}
We have recently upgraded our Prometheus server from 1.8 to 2.2.1.
Calling this endpoint now gives
{
"status": "error",
"errorType": "internal",
"error": "not implemented"
}
I have done some research and found a solution in various locations, which I will summarise in an answer below in case it's of use to my fellow StackOverflowers