Telegraf.Transport.UnixSocket (Telegraf v0.1.0) View Source
Send events to telegraf via a Unix Domain Socket.
It uses NimblePool
to create a pool of open tcp sockets connected
to the socket_path
.
It expects the telegraf daemon to have the Socket Listener Input Plugin configured to listen for messages.
# telegraf.conf
[[inputs.socket_listener]]
service_address = "/tmp/telegraf.sock"
Usage
Add to your supervision tree:
{Telegraf, name: MyTelegraf, transport: Telegraf.Transport.UnixSocket}
With custom options:
{Telegraf,
name: MyTelegraf,
transport: Telegraf.Transport.UnixSocket,
transport_options: [socket_path: "/tmp/cool.sock"]}
Supported options
:socket_path
- Path to the unix socket. The default value is"/tmp/telegraf.sock"
.:pool_size
- The size of the pool tcp sockets. Defaults toSystem.schedulers_online()
.