mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-07-20 16:30:38 +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()
|
done()
|
||||||
return
|
return
|
||||||
case t := <-tick:
|
case t := <-tick:
|
||||||
|
lp.NewMetric("ccmc-begin", map[string]string{"type": "node"}, nil, map[string]interface{}{"value": 0}, time.Now())
|
||||||
cm.parallel_run = true
|
cm.parallel_run = true
|
||||||
for _, c := range cm.collectors {
|
for _, c := range cm.collectors {
|
||||||
// Wait for done signal or execute the collector
|
// Wait for done signal or execute the collector
|
||||||
@@ -179,6 +180,7 @@ func (cm *collectorManager) Start() {
|
|||||||
c.Read(cm.duration, cm.output)
|
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