mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-08-22 10:22:59 +02:00
Respect the publish option in the LikwidCollector
This commit is contained in:
@@ -435,6 +435,7 @@ func (m *LikwidCollector) calcEventsetMetrics(group int, interval time.Duration,
|
|||||||
}
|
}
|
||||||
m.mresults[group][tid][metric.Name] = value
|
m.mresults[group][tid][metric.Name] = value
|
||||||
// Now we have the result, send it with the proper tags
|
// Now we have the result, send it with the proper tags
|
||||||
|
if metric.Publish {
|
||||||
tags := map[string]string{"type": metric.Scope.String()}
|
tags := map[string]string{"type": metric.Scope.String()}
|
||||||
if metric.Scope != "node" {
|
if metric.Scope != "node" {
|
||||||
tags["type-id"] = fmt.Sprintf("%d", domain)
|
tags["type-id"] = fmt.Sprintf("%d", domain)
|
||||||
@@ -447,6 +448,7 @@ func (m *LikwidCollector) calcEventsetMetrics(group int, interval time.Duration,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -472,6 +474,7 @@ func (m *LikwidCollector) calcGlobalMetrics(interval time.Duration, output chan
|
|||||||
}
|
}
|
||||||
m.gmresults[tid][metric.Name] = value
|
m.gmresults[tid][metric.Name] = value
|
||||||
// Now we have the result, send it with the proper tags
|
// Now we have the result, send it with the proper tags
|
||||||
|
if metric.Publish {
|
||||||
tags := map[string]string{"type": metric.Scope.String()}
|
tags := map[string]string{"type": metric.Scope.String()}
|
||||||
if metric.Scope != "node" {
|
if metric.Scope != "node" {
|
||||||
tags["type-id"] = fmt.Sprintf("%d", domain)
|
tags["type-id"] = fmt.Sprintf("%d", domain)
|
||||||
@@ -484,6 +487,7 @@ func (m *LikwidCollector) calcGlobalMetrics(interval time.Duration, output chan
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user