Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(agent): Avoid panic by checking for skip_processors_after_aggregators #16477

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions cmd/telegraf/cmd_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"os"
"path/filepath"

"github.com/fatih/color"
"github.com/urfave/cli/v2"

"github.com/influxdata/telegraf/agent"
Expand Down Expand Up @@ -85,6 +86,16 @@ func getConfigCommands(configHandlingFlags []cli.Flag, outputBuffer io.Writer) [
}

ag := agent.NewAgent(c)

// Set the default for processor skipping
if c.Agent.SkipProcessorsAfterAggregators == nil {
msg := `The default value of 'skip_processors_after_aggregators' will change to 'true' with Telegraf v1.40.0! `
msg += `If you need the current default behavior, please explicitly set the option to 'false'!`
log.Print("W! [agent] ", color.YellowString(msg))
skipProcessorsAfterAggregators := false
c.Agent.SkipProcessorsAfterAggregators = &skipProcessorsAfterAggregators
}

return ag.InitPlugins()
},
},
Expand Down
Loading