Documentation

Binary output data format

Use the binary output data format (serializer) to serialize Telegraf metrics into binary protocols using user-specified configurations.

Configuration

[[outputs.socket_writer]]
  address = "tcp://127.0.0.1:54000"
  metric_batch_size = 1

  ## Data format to output.
  data_format = "binary"

  ## Specify the endianness of the data.
  ## Available values are "little" (little-endian), "big" (big-endian) and "host",
  ## where "host" means the same endianness as the machine running Telegraf.
  # endianness = "host"

  ## Definition of the message format and the serialized data.
  ## Please note that you need to define all elements of the data in the
  ## correct order as the binary format is position-dependent.
  ##
  ## Entry properties:
  ##  read_from         --  Source of the data: "field", "tag", "time" or "name".
  ##                        Defaults to "field" if omitted.
  ##  name              --  Name of the field or tag. Can be omitted for "time" and "name".
  ##  data_format       --  Target data-type: "int8/16/32/64", "uint8/16/32/64",
  ##                        "float32/64", "string".
  ##                        For time: "unix" (default), "unix_ms", "unix_us", "unix_ns".
  ##  string_length     --  Length of the string in bytes (for "string" type only).
  ##  string_terminator --  Terminator for strings: "null", "0x00", etc.
  ##                        Defaults to "null" for strings.
  entries = [
    { read_from = "name", data_format = "string", string_length = 32 },
    { read_from = "tag", name = "host", data_format = "string", string_length = 64 },
    { read_from = "field", name = "value", data_format = "float64" },
    { read_from = "time", data_format = "unix_ns" },
  ]

Configuration options

OptionTypeDescription
endiannessstringByte order: "little", "big", or "host" (default)
entriesarrayOrdered list of data elements to serialize

Entry properties

Each entry in the entries array defines how to serialize a piece of metric data:

PropertyTypeDescription
read_fromstringData source: "field", "tag", "time", or "name"
namestringField or tag name (required for "field" and "tag")
data_formatstringTarget type: "int8/16/32/64", "uint8/16/32/64", "float32/64", "string"
string_lengthintegerFixed string length in bytes (for "string" type)
string_terminatorstringString terminator: "null", "0x00", etc.

Type conversion

If the original field type differs from the target type, the serializer converts the value. A warning is logged if the conversion may cause loss of precision.

String handling

For string fields:

  • If the string is longer than string_length, it is truncated so that the string and its terminator together fit within string_length bytes
  • If the string is shorter than string_length, it is padded with the terminator character so that the string and its terminator together occupy string_length bytes

Was this page helpful?

Thank you for your feedback!


InfluxDB 3.9: Performance upgrade preview

InfluxDB 3 Enterprise 3.9 includes a beta of major performance upgrades with faster single-series queries, wide-and-sparse table support, and more.

InfluxDB 3 Enterprise 3.9 includes a beta of major performance and feature updates.

Key improvements:

  • Faster single-series queries
  • Consistent resource usage
  • Wide-and-sparse table support
  • Automatic distinct value caches for reduced latency with metadata queries

Preview features are subject to breaking changes.

For more information, see:

Telegraf Enterprise now in public beta

Get early access to the Telegraf Controller and provide feedback to help shape the future of Telegraf Enterprise.

See the Blog Post

The upcoming Telegraf Enterprise offering is for organizations running Telegraf at scale and is comprised of two key components:

  • Telegraf Controller: A control plane (UI + API) that centralizes Telegraf configuration management and agent health visibility.
  • Telegraf Enterprise Support: Official support for Telegraf Controller and Telegraf plugins.

Join the Telegraf Enterprise beta to get early access to the Telegraf Controller and provide feedback to help shape the future of Telegraf Enterprise.

For more information:

InfluxDB Docker latest tag changing to InfluxDB 3 Core

On May 27, 2026, the latest tag for InfluxDB Docker images will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments.

If using Docker to install and run InfluxDB, the latest tag will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments. For example, if using Docker to run InfluxDB v2, replace the latest version tag with a specific version tag in your Docker pull command–for example:

docker pull influxdb:2