mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-07-19 08:00:36 +02:00
Add ccmc-{begin,end} markers
These markers are sent out at the beginning and end of a collection run. This can be used to reconstruct, which metrics belong together and were obtained during the same tick.
This commit is contained in:
@@ -148,6 +148,7 @@ func (cm *collectorManager) Start() {
|
||||
done()
|
||||
return
|
||||
case t := <-tick:
|
||||
lp.NewMetric("ccmc-begin", map[string]string{"type": "node"}, nil, map[string]interface{}{"value": 0}, time.Now())
|
||||
cm.parallel_run = true
|
||||
for _, c := range cm.collectors {
|
||||
// Wait for done signal or execute the collector
|
||||
@@ -179,6 +180,7 @@ func (cm *collectorManager) Start() {
|
||||
c.Read(cm.duration, cm.output)
|
||||
}
|
||||
}
|
||||
lp.NewMetric("ccmc-end", map[string]string{"type": "node"}, nil, map[string]interface{}{"value": 0}, time.Now())
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user