diff --git a/pkg/models/metrics/metricsruleconst.go b/pkg/models/metrics/metricsruleconst.go index 4be60151aef5c0daa748be0135b0b905c7296105..45f46d77c269269f695b73e96c20324f17daee84 100644 --- a/pkg/models/metrics/metricsruleconst.go +++ b/pkg/models/metrics/metricsruleconst.go @@ -13,10 +13,6 @@ limitations under the License. package metrics -import ( - "fmt" -) - const ( ResultTypeVector = "vector" ResultTypeMatrix = "matrix" @@ -735,11 +731,3 @@ var RulePromQLTmplMap = MetricMap{ "prometheus_up_sum": `prometheus:up:sum`, "prometheus_tsdb_head_samples_appended_rate": `prometheus:prometheus_tsdb_head_samples_appended:sum_rate`, } - -func init() { - for metric, promql := range RulePromQLTmplMap { - - // Use absent() to fill missing data with zero - RulePromQLTmplMap[metric] = fmt.Sprintf("%s or absent(%s)-1", promql, promql) - } -}