tcp_listener

package
v1.29.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 9 Imported by: 0

README

TCP Listener Input Plugin

DEPRECATED: As of version 1.3 the TCP listener plugin has been deprecated in favor of the socket_listener plugin

Service Input

This plugin is a service input. Normal plugins gather metrics determined by the interval setting. Service plugins start a service to listens and waits for metrics or events to occur. Service plugins have two key differences from normal plugins:

  1. The global or plugin specific interval setting may not apply
  2. The CLI options of --test, --test-wait, and --once may not produce output for this plugin

Global configuration options

In addition to the plugin-specific configuration settings, plugins support additional global and plugin configuration settings. These settings are used to modify metrics, tags, and field or create aliases and configure ordering, etc. See the CONFIGURATION.md for more details.

Configuration

# Generic TCP listener
[[inputs.tcp_listener]]
  # socket_listener plugin
  # see https://github.com/influxdata/telegraf/tree/master/plugins/inputs/socket_listener

Metrics

Example Output

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCPListener added in v1.18.0

type TCPListener struct {
	ServiceAddress         string
	AllowedPendingMessages int
	MaxTCPConnections      int `toml:"max_tcp_connections"`

	sync.Mutex

	MaxConnections     selfstat.Stat
	CurrentConnections selfstat.Stat
	TotalConnections   selfstat.Stat
	PacketsRecv        selfstat.Stat
	BytesRecv          selfstat.Stat

	Log telegraf.Logger
	// contains filtered or unexported fields
}

func (*TCPListener) Gather added in v1.18.0

func (t *TCPListener) Gather(_ telegraf.Accumulator) error

All the work is done in the Start() function, so this is just a dummy function.

func (*TCPListener) SampleConfig added in v1.18.0

func (*TCPListener) SampleConfig() string

func (*TCPListener) SetParser added in v1.18.0

func (t *TCPListener) SetParser(parser telegraf.Parser)

func (*TCPListener) Start added in v1.18.0

func (t *TCPListener) Start(acc telegraf.Accumulator) error

Start starts the tcp listener service.

func (*TCPListener) Stop added in v1.18.0

func (t *TCPListener) Stop()

Stop cleans up all resources

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL