portname

package
v1.15.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 7 Imported by: 1

README

Port Name Lookup Processor Plugin

Use the port_name processor to convert a tag containing a well-known port number to the registered service name.

Tag can contain a number ("80") or number and protocol separated by slash ("443/tcp"). If protocol is not provided it defaults to tcp but can be changed with the default_protocol setting.

Telegraf minimum version: Telegraf 1.15.0

Configuration
[[processors.port_name]]
  ## Name of tag holding the port number
  # tag = "port"

  ## Name of output tag where service name will be added
  # dest = "service"

  ## Default tcp or udp
  # default_protocol = "tcp"
Example
- measurement,port=80 field=123 1560540094000000000
+ measurement,port=80,service=http field=123 1560540094000000000

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PortName

type PortName struct {
	SourceTag       string `toml:"tag"`
	DestTag         string `toml:"dest"`
	DefaultProtocol string `toml:"default_protocol"`

	Log telegraf.Logger `toml:"-"`
}

func (*PortName) Apply

func (d *PortName) Apply(metrics ...telegraf.Metric) []telegraf.Metric

func (*PortName) Description

func (d *PortName) Description() string

func (*PortName) Init

func (h *PortName) Init() error

func (*PortName) SampleConfig

func (d *PortName) SampleConfig() string

Jump to

Keyboard shortcuts

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