influxdata / influxdata/telegraf
puppet plugin custom resources from last_run_summary
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Use Case
specify a list of additional custom resources to report on from the yaml
### Expected behavior
counters will be added for these custom resources
### Actual behavior
This is a statically defined list in code:
https://github.com/influxdata/telegraf/blob/master/plugins/inputs/puppetagent/puppetagent.go#L56-#L78
However, additional struct items can be output. For instance, on a windows node you might want to define
Registryvalue float64 `yaml:"registry_value"`
These will largely be dependent on the last_run_summary.yaml of a node.
For instance the values might require some user defined configuration:
```
time:
audit_policy: 0.015552399999999997
catalog_application: 12.702384400065057
chocolateysource: 0.0005288
config_retrieval: 1.086993100005202
convert_catalog: 1.4537254000315443
exec: 6.6299175
fact_generation: 3.570928900036961
file: 0.0324541
file_line: 0.014903999999999995
filebucket: 0.0001311
group: 0.0235182
local_security_policy: 0.0621579
package: 1.9399391000000004
plugin_sync: 1.6557640000246465
reboot: 0.0005569
registry_key: 0.018593
registry_value: 0.08759190000000001
schedule: 0.0003258
service: 0.010542800000000003
startup_time: 1.2416734
total: 24.1869254
transaction_evaluation: 12.55120290000923
user: 0.0095031
windows_env: 0.0011035
last_run: 1730772855
```
### Additional info
_No response_
Contributor guide
Research direction
Start in plugins/inputs/puppetagent/puppetagent.go at the statically defined custom-resource list, then inspect how last_run_summary.yaml values are read. Done means user configuration can name additional custom resources, including entries such as registry_value, and counters are reported for them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100