Skip to content

Prometheus alert query is created incorrectly

It seems as though since !31362 (merged) the variable substitution has been broken when creating Prometheus Alerts through the GitLab UI.

Running Clusters::ApplicationsPrometheusConfigService doesn't seem to substitute the params anymore.

Cause:

Previously we were using String#% to replace the strings which expects the input string to contain %{var_to_replace}. As this format was removed in the MR we encounter the issue.