未验证 提交 5f86fa89 编写于 作者: H huanggze

monitor: remove absent from PromQL

Signed-off-by: Nhuanggze <loganhuang@yunify.com>
上级 3a225f12
......@@ -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)
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册