Skip to content
Open
Show file tree
Hide file tree
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
9 changes: 7 additions & 2 deletions plugins/inputs/puppetagent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ plugin ordering. See [CONFIGURATION.md][CONFIGURATION.md] for more details.
```toml @sample.conf
# Reads last_run_summary.yaml file and converts to measurements
[[inputs.puppetagent]]
## Location of puppet last run summary file
location = "/var/lib/puppet/state/last_run_summary.yaml"
## Location of Puppet last run summary file (Puppet default: $publicdir/last_run_summary.yaml)
location = "/opt/puppetlabs/puppet/public/last_run_summary.yaml"
```

If you use a distro packaged puppet the `$publicdir` might be different from above.

By default, this file is not readable by the `telegraf` user.
You can adjust file permissions by configuring the `lastrunfile` setting in Puppet.

## Metrics

### PuppetAgent int64 measurements
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/puppetagent/puppetagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (*PuppetAgent) SampleConfig() string {

func (pa *PuppetAgent) Gather(acc telegraf.Accumulator) error {
if len(pa.Location) == 0 {
pa.Location = "/var/lib/puppet/state/last_run_summary.yaml"
pa.Location = "/opt/puppetlabs/puppet/public/last_run_summary.yaml"
}

if _, err := os.Stat(pa.Location); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions plugins/inputs/puppetagent/sample.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Reads last_run_summary.yaml file and converts to measurements
[[inputs.puppetagent]]
## Location of puppet last run summary file
location = "/var/lib/puppet/state/last_run_summary.yaml"
## Location of Puppet last run summary file (Puppet default: $publicdir/last_run_summary.yaml)
location = "/opt/puppetlabs/puppet/public/last_run_summary.yaml"
Loading