fix: collector crash without db
This commit is contained in:
parent
38f32952c2
commit
0c18f402a0
@ -98,7 +98,9 @@ func (coll *Collector) sender() {
|
|||||||
return
|
return
|
||||||
case <-coll.ticker.C:
|
case <-coll.ticker.C:
|
||||||
// save global statistics
|
// save global statistics
|
||||||
|
if coll.db != nil {
|
||||||
coll.db.AddPoint(database.MeasurementGlobal, nil, coll.nodes.GlobalStats().Fields(), time.Now())
|
coll.db.AddPoint(database.MeasurementGlobal, nil, coll.nodes.GlobalStats().Fields(), time.Now())
|
||||||
|
}
|
||||||
|
|
||||||
// send the multicast packet to request per-node statistics
|
// send the multicast packet to request per-node statistics
|
||||||
coll.sendOnce()
|
coll.sendOnce()
|
||||||
|
Loading…
Reference in New Issue
Block a user