package ccmetric rewrite

This commit is contained in:
Holger Obermaier
2022-01-31 20:54:06 +01:00
parent 862630a218
commit eca963c58a
4 changed files with 86 additions and 158 deletions

View File

@@ -141,11 +141,11 @@ func (r *metricRouter) EvalCondition(cond string, point lp.CCMetric) (bool, erro
// Add metric name, tags, meta data, fields and timestamp to the parameter list
params := make(map[string]interface{})
params["name"] = point.Name()
for _, t := range point.TagList() {
params[t.Key] = t.Value
for key, value := range point.TagMap() {
params[key] = value
}
for _, m := range point.MetaList() {
params[m.Key] = m.Value
for key, value := range point.MetaMap() {
params[key] = value
}
for _, f := range point.FieldList() {
params[f.Key] = f.Value