Implement AddGauge & AddCounter functions

and utilize them in the in the 'system' input plugins.
This commit is contained in:
Cameron Sparr
2016-08-31 17:27:37 +01:00
parent 6dbbe65897
commit b18d375d6c
12 changed files with 213 additions and 57 deletions

View File

@@ -11,6 +11,20 @@ type Accumulator interface {
tags map[string]string,
t ...time.Time)
// AddGauge is the same as AddFields, but will add the metric as a "Gauge"
// type
AddGauge(measurement string,
fields map[string]interface{},
tags map[string]string,
t ...time.Time)
// AddCounter is the same as AddFields, but will add the metric as a "Counter"
// type
AddCounter(measurement string,
fields map[string]interface{},
tags map[string]string,
t ...time.Time)
AddError(err error)
Debug() bool