Clean up additional logging and always print basic agent config
This commit is contained in:
parent
f5d1aaf7d9
commit
b01c28ebc6
8
agent.go
8
agent.go
|
@ -220,8 +220,8 @@ func (a *Agent) crankParallel() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
elapsed := time.Since(start)
|
elapsed := time.Since(start)
|
||||||
log.Printf("Cranking default interval, gathered %d metrics from %d plugins in %s\n",
|
log.Printf("Cranking default (%s) interval, gathered %d metrics from %d plugins in %s\n",
|
||||||
len(bp.Points), counter, elapsed)
|
a.Interval, len(bp.Points), counter, elapsed)
|
||||||
return a.flush(&bp)
|
return a.flush(&bp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,8 +278,8 @@ func (a *Agent) crankSeparate(shutdown chan struct{}, plugin *runningPlugin) err
|
||||||
}
|
}
|
||||||
|
|
||||||
elapsed := time.Since(start)
|
elapsed := time.Since(start)
|
||||||
log.Printf("Cranking separate interval, gathered %d metrics from %s in %s\n",
|
log.Printf("Cranking separate (%s) interval, gathered %d metrics from %s in %s\n",
|
||||||
len(bp.Points), plugin.name, elapsed)
|
plugin.config.Interval, len(bp.Points), plugin.name, elapsed)
|
||||||
if err := a.flush(&bp); err != nil {
|
if err := a.flush(&bp); err != nil {
|
||||||
outerr = errors.New("Error encountered processing plugins & outputs")
|
outerr = errors.New("Error encountered processing plugins & outputs")
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,12 +132,9 @@ func main() {
|
||||||
log.Printf("Starting Telegraf (version %s)\n", Version)
|
log.Printf("Starting Telegraf (version %s)\n", Version)
|
||||||
log.Printf("Loaded outputs: %s", strings.Join(outputs, " "))
|
log.Printf("Loaded outputs: %s", strings.Join(outputs, " "))
|
||||||
log.Printf("Loaded plugins: %s", strings.Join(plugins, " "))
|
log.Printf("Loaded plugins: %s", strings.Join(plugins, " "))
|
||||||
if ag.Debug {
|
log.Printf("Agent Config: Interval:%s, Debug:%#v, Hostname:%#v, "+
|
||||||
log.Printf("Debug: enabled")
|
"Precision:%#v, UTC: %#v\n",
|
||||||
log.Printf("Agent Config: Interval:%s, Debug:%#v, Hostname:%#v, "+
|
ag.Interval, ag.Debug, ag.Hostname, ag.Precision, ag.UTC)
|
||||||
"Precision:%#v, UTC: %#v\n",
|
|
||||||
ag.Interval, ag.Debug, ag.Hostname, ag.Precision, ag.UTC)
|
|
||||||
}
|
|
||||||
log.Printf("Tags enabled: %s", config.ListTags())
|
log.Printf("Tags enabled: %s", config.ListTags())
|
||||||
|
|
||||||
if *fPidfile != "" {
|
if *fPidfile != "" {
|
||||||
|
|
Loading…
Reference in New Issue