add log when configured
This commit is contained in:
parent
db85c29aba
commit
16bb468d7d
|
|
@ -201,6 +201,7 @@ func (u *DatadogUnifi) Run(c poller.Collect) error {
|
||||||
u.Logger.Error("DataDog config is missing and is not disabled: Datadog output is disabled!")
|
u.Logger.Error("DataDog config is missing and is not disabled: Datadog output is disabled!")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
u.Logger.Info("Datadog is configured.")
|
||||||
|
|
||||||
u.Collector = c
|
u.Collector = c
|
||||||
u.setConfigDefaults()
|
u.setConfigDefaults()
|
||||||
|
|
@ -208,6 +209,7 @@ func (u *DatadogUnifi) Run(c poller.Collect) error {
|
||||||
var err error
|
var err error
|
||||||
u.datadog, err = statsd.New(u.Address, u.options...)
|
u.datadog, err = statsd.New(u.Address, u.options...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
u.Logger.Error("Error configuration Datadog agent reporting", zap.Error(err))
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue