diff --git a/CHANGELOG.md b/CHANGELOG.md index ed7ff2a2e454d1f9da0e4b78231ad595103ae1c1..1357e6d901911a778be9d67ceb0ca6fda1f344e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ in their config file. - [#2045](https://github.com/influxdata/telegraf/issues/2045): Graylog output should set short_message field. - [#1904](https://github.com/influxdata/telegraf/issues/1904): Hddtemp always put the value in the field temperature. - [#1693](https://github.com/influxdata/telegraf/issues/1693): Properly collect nested jolokia struct data. +- [#1917](https://github.com/influxdata/telegraf/pull/1917): fix puppetagent inputs plugin to support string for config variable. ## v1.1.2 [2016-12-12] diff --git a/plugins/inputs/puppetagent/last_run_summary.yaml b/plugins/inputs/puppetagent/last_run_summary.yaml index 1f5dea3cea7c0633dec742152da38314e0aa4f7f..be2f017465fad1677971fe6da0b2ceb11681e09f 100644 --- a/plugins/inputs/puppetagent/last_run_summary.yaml +++ b/plugins/inputs/puppetagent/last_run_summary.yaml @@ -30,5 +30,5 @@ last_run: 1444936531 cron: 0.000584 version: - config: 1444936521 - puppet: "3.7.5" \ No newline at end of file + config: "environment:d6018ce" + puppet: "3.7.5" diff --git a/plugins/inputs/puppetagent/puppetagent.go b/plugins/inputs/puppetagent/puppetagent.go index f66aa989f62609017827412d1d012e39b7bcf133..c8a265bb857bc541be3a7527dccdc4dfa6499ec9 100644 --- a/plugins/inputs/puppetagent/puppetagent.go +++ b/plugins/inputs/puppetagent/puppetagent.go @@ -68,8 +68,8 @@ type time struct { } type version struct { - Config int64 `yaml:"config"` - Puppet string `yaml:"puppet"` + ConfigString string `yaml:"config"` + Puppet string `yaml:"puppet"` } // SampleConfig returns sample configuration message diff --git a/plugins/inputs/puppetagent/puppetagent_test.go b/plugins/inputs/puppetagent/puppetagent_test.go index d1470bc27bc8fa7f1eb8d721c331d1aa84cd5e1d..b1c447887f23c271288cb4a940dd777faf0d2f5e 100644 --- a/plugins/inputs/puppetagent/puppetagent_test.go +++ b/plugins/inputs/puppetagent/puppetagent_test.go @@ -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_configstring": "environment:d6018ce", "time_user": float64(0.004331), "time_schedule": float64(0.001123), "time_filebucket": float64(0.000353),