udp_listener

package
v0.0.0-...-16a0e24 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: MIT Imports: 9 Imported by: 0

README

UDP listener service input plugin

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

Documentation

Index

Constants

View Source
const UDP_MAX_PACKET_SIZE int = 64 * 1024

UDP_MAX_PACKET_SIZE is packet limit, see https://en.wikipedia.org/wiki/User_Datagram_Protocol#Packet_structure

Variables

This section is empty.

Functions

This section is empty.

Types

type UdpListener

type UdpListener struct {
	ServiceAddress string

	// UDPBufferSize should only be set if you want/need the telegraf UDP socket to
	// differ from the system setting. In cases where you set the rmem_default to a lower
	// value at the host level, but need a larger buffer for UDP bursty traffic, this
	// setting enables you to configure that value ONLY for telegraf UDP sockets on this listener
	// Set this to 0 (or comment out) to take system default
	//
	// NOTE: You should ensure that your rmem_max is >= to this setting to work properly!
	// (e.g. sysctl -w net.core.rmem_max=N)
	UDPBufferSize          int `toml:"udp_buffer_size"`
	AllowedPendingMessages int

	// UDPPacketSize is deprecated, it's only here for legacy support
	// we now always create 1 max size buffer and then copy only what we need
	// into the in channel
	// see https://gitee.com/zhimiao/qiansi-telegraf/pull/992
	UDPPacketSize int `toml:"udp_packet_size"`

	sync.Mutex

	PacketsRecv selfstat.Stat
	BytesRecv   selfstat.Stat

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

UdpListener main struct for the collector

func (*UdpListener) Description

func (u *UdpListener) Description() string

func (*UdpListener) Gather

func (u *UdpListener) Gather(_ telegraf.Accumulator) error

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

func (*UdpListener) SampleConfig

func (u *UdpListener) SampleConfig() string

func (*UdpListener) SetParser

func (u *UdpListener) SetParser(parser parsers.Parser)

func (*UdpListener) Start

func (u *UdpListener) Start(acc telegraf.Accumulator) error

func (*UdpListener) Stop

func (u *UdpListener) Stop()

Jump to

Keyboard shortcuts

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