telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

[[outpus.execd]] Error handling

Open Ignatella opened this issue 2 months ago • 1 comments

Use Case

Telegraf encourages the development of external plugins that can be integrated via the execd plugin. However, its error handling model is limited, as communication between Telegraf and external plugins relies solely on standard input and output streams

Example:

amqp -> telegraf -> execd -> custom output

When using inputs like AMQP, messages are trackable and typically acknowledged only after successful processing (ie with http output). In contrast, with the execd plugin, metrics may remain buffered (as stdin write is not blocking up to ~64 KB by default) or be lost if an error occurs during processing by the custom output plugin.

Expected behavior

The potential loss of metrics is at least documented. Alternative communication mechanisms, such as Unix sockets or named pipes, are proposed to improve reliability and enable proper error handling.

Actual behavior

Execd plugin might silently lose metrics

Additional info

No response

Ignatella avatar Oct 19 '25 22:10 Ignatella

#17828 related

Ignatella avatar Oct 20 '25 13:10 Ignatella