telegraf/plugins/processors/port_name
Joshua Powers 4605c977da
chore: clean up all markdown lint errors in processor plugins (#10157)
2021-11-24 11:47:11 -07:00
..
README.md chore: clean up all markdown lint errors in processor plugins (#10157) 2021-11-24 11:47:11 -07:00
port_name.go Revive fixes - part 4: (#8981) 2021-03-12 14:21:51 -06:00
port_name_test.go Add support for fields and protocol lookups in port_name. (#8157) 2020-10-19 10:49:48 -04:00
services_path.go fix: support 1.17 & 1.16.7 Go versions (#9642) 2021-08-23 15:37:44 -05:00
services_path_notwindows.go fix: support 1.17 & 1.16.7 Go versions (#9642) 2021-08-23 15:37:44 -05:00

README.md

Port Name Lookup Processor Plugin

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

Tag or field 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. An additional tag or field can be specified for the protocol.

If the source was found in tag, the service name will be added as a tag. If the source was found in a field, the service name will also be a field.

Telegraf minimum version: Telegraf 1.15.0

Configuration

[[processors.port_name]]
  ## Name of tag holding the port number
  # tag = "port"
  ## Or name of the field holding the port number
  # field = "port"

  ## Name of output tag or field (depending on the source) where service name will be added
  # dest = "service"

  ## Default tcp or udp
  # default_protocol = "tcp"

  ## Tag containing the protocol (tcp or udp, case-insensitive)
  # protocol_tag = "proto"

  ## Field containing the protocol (tcp or udp, case-insensitive)
  # protocol_field = "proto"

Example

- measurement,port=80 field=123 1560540094000000000
+ measurement,port=80,service=http field=123 1560540094000000000