[TASK] add autoupdater to graphite database
This commit is contained in:
parent
7324567f91
commit
62bb21102f
|
@ -9,10 +9,11 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
MeasurementNode = "node" // Measurement for per-node statistics
|
||||
MeasurementGlobal = "global" // Measurement for summarized global statistics
|
||||
CounterMeasurementFirmware = "firmware" // Measurement for firmware statistics
|
||||
CounterMeasurementModel = "model" // Measurement for model statistics
|
||||
MeasurementNode = "node" // Measurement for per-node statistics
|
||||
MeasurementGlobal = "global" // Measurement for summarized global statistics
|
||||
CounterMeasurementFirmware = "firmware" // Measurement for firmware statistics
|
||||
CounterMeasurementModel = "model" // Measurement for model statistics
|
||||
CounterMeasurementAutoupdater = "autoupdater" // Measurement for autoupdater
|
||||
)
|
||||
|
||||
type Connection struct {
|
||||
|
|
|
@ -11,16 +11,19 @@ func (c *Connection) InsertGlobals(stats *runtime.GlobalStats, time time.Time, s
|
|||
measurementGlobal := MeasurementGlobal
|
||||
counterMeasurementModel := CounterMeasurementModel
|
||||
counterMeasurementFirmware := CounterMeasurementFirmware
|
||||
counterMeasurementAutoupdater := CounterMeasurementAutoupdater
|
||||
|
||||
if site != runtime.GLOBAL_SITE {
|
||||
measurementGlobal += "_" + site
|
||||
counterMeasurementModel += "_" + site
|
||||
counterMeasurementFirmware += "_" + site
|
||||
counterMeasurementAutoupdater += "_" + site
|
||||
}
|
||||
|
||||
c.addPoint(GlobalStatsFields(measurementGlobal, stats))
|
||||
c.addCounterMap(counterMeasurementModel, stats.Models, time)
|
||||
c.addCounterMap(counterMeasurementFirmware, stats.Firmwares, time)
|
||||
c.addCounterMap(counterMeasurementAutoupdater, stats.Autoupdater, time)
|
||||
}
|
||||
|
||||
func GlobalStatsFields(name string, stats *runtime.GlobalStats) []graphigo.Metric {
|
||||
|
|
Loading…
Reference in New Issue