A work scenario that I can't cover currently is that I want to set a maintenance mode, meaning all alerts received from Prometheus to be ignored, I want to be able to set it through the UI for a given period until maintenance finish. One way to do it is manually to start covering each alert which in Prometheus-operator scenario is not sane, or I would lose a couple of hours. I can change config from secret to route all to null, but that is not practical as it requires multiple actions and is not good for on time or other user usage. So I tried to use regex for key and value. Both set to .* .* regex. On preview I get all alerts covered, but when I click Create I get "Bad Request"? I couldn't find examples in internet and on official page which surprised me quite a lot. enter image description here


What about Name = "prometheus", Value = ".*". That is something that worked for me. enter image description here

An alternative can be Name = "severity", Value = ".*" also.

  • thank you, your answer made me realize I didn't test key alertname with value .*, which works as well as the options you have covered, thanks a lot. It looks like request with any key is not acceptable to the api. Jun 23 '20 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.