Documentation ¶
Index ¶
- type CirconusSink
- func (s *CirconusSink) AddSample(key []string, val float32)
- func (s *CirconusSink) AddSampleWithLabels(key []string, val float32, labels []metrics.Label)
- func (s *CirconusSink) EmitKey(key []string, val float32)
- func (s *CirconusSink) Flush()
- func (s *CirconusSink) IncrCounter(key []string, val float32)
- func (s *CirconusSink) IncrCounterWithLabels(key []string, val float32, labels []metrics.Label)
- func (s *CirconusSink) SetGauge(key []string, val float32)
- func (s *CirconusSink) SetGaugeWithLabels(key []string, val float32, labels []metrics.Label)
- func (s *CirconusSink) Start()
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CirconusSink ¶
type CirconusSink struct {
// contains filtered or unexported fields
}
CirconusSink provides an interface to forward metrics to Circonus with automatic check creation and metric management
func NewCirconusSink ¶
func NewCirconusSink(cc *Config) (*CirconusSink, error)
NewCirconusSink - create new metric sink for circonus
one of the following must be supplied:
- API Token - search for an existing check or create a new check
- API Token + Check Id - the check identified by check id will be used
- API Token + Check Submission URL - the check identified by the submission url will be used
- Check Submission URL - the check identified by the submission url will be used metric management will be *disabled*
Note: If submission url is supplied w/o an api token, the public circonus ca cert will be used to verify the broker for metrics submission.
func (*CirconusSink) AddSample ¶
func (s *CirconusSink) AddSample(key []string, val float32)
AddSample adds a sample to a histogram metric
func (*CirconusSink) AddSampleWithLabels ¶
func (s *CirconusSink) AddSampleWithLabels(key []string, val float32, labels []metrics.Label)
AddSampleWithLabels adds a sample to a histogram metric with the given labels
func (*CirconusSink) EmitKey ¶
func (s *CirconusSink) EmitKey(key []string, val float32)
EmitKey is not implemented in circonus
func (*CirconusSink) Flush ¶
func (s *CirconusSink) Flush()
Flush manually triggers metric submission to Circonus
func (*CirconusSink) IncrCounter ¶
func (s *CirconusSink) IncrCounter(key []string, val float32)
IncrCounter increments a counter metric
func (*CirconusSink) IncrCounterWithLabels ¶
func (s *CirconusSink) IncrCounterWithLabels(key []string, val float32, labels []metrics.Label)
IncrCounterWithLabels increments a counter metric with the given labels
func (*CirconusSink) SetGauge ¶
func (s *CirconusSink) SetGauge(key []string, val float32)
SetGauge sets value for a gauge metric
func (*CirconusSink) SetGaugeWithLabels ¶
func (s *CirconusSink) SetGaugeWithLabels(key []string, val float32, labels []metrics.Label)
SetGaugeWithLabels sets value for a gauge metric with the given labels
func (*CirconusSink) Start ¶
func (s *CirconusSink) Start()
Start submitting metrics to Circonus (flush every SubmitInterval)
type Config ¶
Config options for CirconusSink See https://github.com/circonus-labs/circonus-gometrics for configuration options