influxdata / influxdata/telegraf
Debugging option to understand serialization issues
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Use Case
This is a result of: https://github.com/influxdata/telegraf/issues/17235#issuecomment-3509885081
When serialization fails, it would be handy to have an option to view the ingested data to better understand where the serialization issue is coming from in detail. This may be required for cases of the `inputs.exec` plugin or alike, where data is potentially dynamically generated.
In our specific case, we use a PowerShell script that outputs information from Veeam as a JSON object, which is ingested in Telegraf and written in Influx Line Protocol to our server. But because Powershell can be quirky, sometimes it may run into an issue where the object ends up potentialyl malformed. Being able to see _what exactly_ was malformed may help us to improve that script. There are likely other use-cases also.
### Expected behavior
The expected behaviour would be that given an option (either globally in the `agent` settings or more tightly scoped at the plugin configuration level) the agent would log serialization issues and possibly write them to it's own default logging location (`stdout` in most cases, much like most other errors).
### Actual behavior
None, it's a feature request. :)
Right now, this behaviour does not exist.
### Additional info
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the serialization failure path for inputs.exec and reviewing how agent settings, plugin configuration, and stdout logging are handled. Define an option that exposes the ingested data when serialization fails, with behavior scoped globally or to a plugin, and confirm that the malformed input is logged for diagnosis.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, powershell
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100