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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user