telegraf
telegraf copied to clipboard
[procstat] why keep these meaningless fields

- Left side is the code of
procstatand the right side is where these fields are from. Why keep these empty values? - What's the meaning of
cpu_time_idlefor a single process?

This struct TimesStat is defined in "cpu.go". Obviously some fields like Idle and Irq are only for CPU context.
But procstat plugin took them all. It's really confusing.
You are definitely right, they are kept because of backward compatibility or it has not come to attention they are always empty.
You can choose to drop these fields by doing fielddrop on the input config.
You can also create a PR that removes these useless fields, it can then internally be discussed if this is accepted now or for upcoming 2.0 release.