Start enterprise service on boot / placeholders

Adds the enterprise service to the agent's boot process. A few
placeholders have been added because it's not quite clear how we should
generate ProductIDs and ClusterIDs for Telegraf
This commit is contained in:
Tim Raymond
2016-02-11 14:12:18 -05:00
parent 7394375a2e
commit c3c9e80f0a
3 changed files with 12 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ import (
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/internal/config"
"github.com/influxdata/telegraf/internal/models"
"github.com/influxdata/telegraf/services/enterprise"
)
// Agent runs telegraf and collects data based on the given config
@@ -328,6 +329,9 @@ func (a *Agent) Run(shutdown chan struct{}) error {
}
ticker := time.NewTicker(a.Config.Agent.Interval.Duration)
ent := enterprise.NewEnterprise(a.Config.Agent.Enterprise, a.Config.Agent.Hostname, shutdown)
go ent.Open()
wg.Add(1)
go func() {
defer wg.Done()