Statsd listener plugin

implement gauges, sets, counters
This commit is contained in:
Cameron Sparr
2015-09-24 11:06:11 -07:00
parent 316fa1cc01
commit eb2a4dc724
9 changed files with 583 additions and 29 deletions

View File

@@ -361,6 +361,20 @@ func (a *Agent) Run(shutdown chan struct{}) error {
var wg sync.WaitGroup
for _, plugin := range a.plugins {
// Start service of any ServicePlugins
switch p := plugin.plugin.(type) {
case plugins.ServicePlugin:
if err := p.Start(); err != nil {
log.Printf("Service for plugin %s failed to start, exiting\n%s\n",
plugin.name, err.Error())
return err
}
defer p.Stop()
}
// Special handling for plugins that have their own collection interval
// configured. Default intervals are handled below with crankParallel
if plugin.config.Interval != 0 {
wg.Add(1)
go func(plugin *runningPlugin) {