Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix puppetagent inputs plugin to support strings for config variable for environments #1917

Closed
Closed
Show file tree
Hide file tree
Changes from 5 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
4 changes: 2 additions & 2 deletions plugins/inputs/puppetagent/last_run_summary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
last_run: 1444936531
cron: 0.000584
version:
config: 1444936521
puppet: "3.7.5"
config: "environment:d6018ce"
puppet: "3.7.5"
4 changes: 2 additions & 2 deletions plugins/inputs/puppetagent/puppetagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ type time struct {
}

type version struct {
Config int64 `yaml:"config"`
Puppet string `yaml:"puppet"`
Config_string string `yaml:"config"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be ConfigString

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be ConfigString

Puppet string `yaml:"puppet"`
}

// SampleConfig returns sample configuration message
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/puppetagent/puppetagent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestGather(t *testing.T) {
"resources_outofsync": int64(0),
"changes_total": int64(0),
"time_lastrun": int64(1444936531),
"version_config": int64(1444936521),
"version_config_string": "environment:d6018ce",
"time_user": float64(0.004331),
"time_schedule": float64(0.001123),
"time_filebucket": float64(0.000353),
Expand Down