Skip to content

Add Compression Support to the RemoteFile Output Plugin for Telegraf #17376

@alanliangdev

Description

@alanliangdev

Use Case

Use Case:
I want to write data from Telegraf directly to S3 via the RemoteFile output plugin. However, the plugin does not natively support compression.

Problem:

  • Direct RemoteFile → S3 uploads are uncompressed, which results in increased storage costs and higher network bandwidth usage.
  • The File Output plugin does support compression, so I could write compressed files locally and use another tool like fluent-bit or a custom script to upload those files to S3.
  • This two-step approach adds unnecessary complexity and potential latency.

Expected behavior

Add compression options (e.g., gzip, zstd) to the RemoteFile output plugin, similar to the File output plugin.
This way, Telegraf can write compressed files directly to S3 or any compatible target, reducing pipeline complexity, bandwidth, and storage requirements.

Actual behavior

Remote file uploads uncompressed raw JSON files.

Additional info

Current Workaround:

  • Output to compressed files locally with the File plugin,
  • Use fluent-bit or a similar solution to upload to S3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestRequests for new plugin and for new features to existing plugins

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions