---
title: ''
description: Telegraf plugin for sending metrics to Socket Writer
url: https://docs.influxdata.com/telegraf/v1/output-plugins/socket_writer/
estimated_tokens: 763
product: Telegraf Enterprise
version: v1
publisher: InfluxData
canonical: https://docs.influxdata.com/telegraf/v1/output-plugins/socket_writer/
date: '2026-09-07T21:21:55+01:00'
lastmod: '2026-09-07T21:21:55+01:00'
---

==========

* Telegraf v1.3.0+

[Plugin source](https://github.com/influxdata/telegraf/tree/v1.40.3/plugins/outputs/socket_writer/)[Download configuration](https://raw.githubusercontent.com/influxdata/telegraf/refs/tags/v1.40.3/plugins/outputs/socket_writer/sample.conf)

# Socket Writer Output Plugin

This plugin writes metrics to a network service e.g. via UDP or TCP in one of
the supported [data formats](/telegraf/v1/data_formats/output).

**Introduced in:** Telegraf v1.3.0**Tags:** applications, network**OS support:** all

## Global configuration options

Plugins support additional global and plugin configuration settings for tasks
such as modifying metrics, tags, and fields, creating aliases, and configuring
plugin ordering. See [CONFIGURATION.md](/telegraf/v1/configuration/#plugins) for more details.

## Startup error behavior options

In addition to the plugin-specific and global configuration settings the plugin
supports options for specifying the behavior when experiencing startup errors
using the `startup_error_behavior` setting. Available values are:

* `error`: Telegraf with stop and exit in case of startup errors. This is the
  default behavior.
* `ignore`: Telegraf will ignore startup errors for this plugin and disables it
  but continues processing for all other plugins.
* `retry`: Telegraf will try to startup the plugin in every gather or write
  cycle in case of startup errors. The plugin is disabled until
  the startup succeeds.
* `probe`: Telegraf will probe the plugin’s function (if possible) and disables
  the plugin in case probing fails. If the plugin does not support
  probing, Telegraf will behave as if `ignore` was set instead.

## Configuration

```toml
# Generic socket writer capable of handling multiple socket types.
[[outputs.socket_writer]]
  ## URL to connect to
  # address = "tcp://127.0.0.1:8094"
  # address = "tcp://example.com:http"
  # address = "tcp4://127.0.0.1:8094"
  # address = "tcp6://127.0.0.1:8094"
  # address = "tcp6://[2001:db8::1]:8094"
  # address = "udp://127.0.0.1:8094"
  # address = "udp4://127.0.0.1:8094"
  # address = "udp6://127.0.0.1:8094"
  # address = "unix:///tmp/telegraf.sock"
  # address = "unixgram:///tmp/telegraf.sock"
  # address = "vsock://cid:port"

  ## Optional TLS Config
  # tls_ca = "/etc/telegraf/ca.pem"
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"
  ## Use TLS but skip chain & host verification
  # insecure_skip_verify = false

  ## Period between keep alive probes.
  ## Only applies to TCP sockets.
  ## 0 disables keep alive probes.
  ## Defaults to the OS configuration.
  # keep_alive_period = "5m"

  ## Content encoding for message payloads, can be set to "gzip" or to
  ## "identity" to apply no encoding.
  ##
  # content_encoding = "identity"

  ## Data format to generate.
  ## Each data format has its own unique set of configuration options, read
  ## more about them here:
  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
  # data_format = "influx"
```
