Documentation

SFlow Input Plugin

This service plugin produces metrics from information received by acting as a SFlow V5 collector. Currently, the plugin can collect Flow Samples of Ethernet / IPv4, IPv4 TCP and UDP headers. Counters and other header samples are ignored. Please use the netflow plugin for a more modern and sophisticated implementation.

This plugin produces high cardinality data, which when not controlled for will cause high load on your database. Please make sure to filter the produced metrics or configure your database to avoid cardinality issues!

Introduced in: Telegraf v1.14.0 Tags: network OS support: all

Service Input

This plugin is a service input. Normal plugins gather metrics determined by the interval setting. Service plugins start a service to listen and wait 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

Plugins support additional global and plugin configuration settings for tasks such as modifying metrics, tags, and fields, creating aliases, and configuring plugin ordering. See CONFIGURATION.md for more details.

Configuration

# SFlow V5 Protocol Listener
[[inputs.sflow]]
  ## Address to listen for sFlow packets.
  ##   example: service_address = "udp://:6343"
  ##            service_address = "udp4://:6343"
  ##            service_address = "udp6://:6343"
  service_address = "udp://:6343"

  ## Set the size of the operating system's receive buffer.
  ##   example: read_buffer_size = "64KiB"
  # read_buffer_size = ""

Metrics

  • sflow
    • tags:
      • agent_address - IP address of the agent obtaining the sflow sample and sent it to this collector
      • source_id_type - type of flow_sample or flow_sample_expanded structures
      • source_id_index - index of flow_sample or flow_sample_expanded structures
      • input_ifindex - input value of flow_sample or flow_sample_expanded structures
      • output_ifindex - output value of flow_sample or flow_sample_expanded structures
      • sample_direction - source_id_index, netif_index_in and netif_index_out
      • header_protocol - header_protocol field of sampled_header structures
      • ether_type - ethernet type of an ETHERNET-ISO88023 header
      • src_ip - source IP address of IPv4 or IPv6 structures
      • src_port - source port of TCP or UDP structures
      • src_port_name - name of the source port
      • src_mac - source MAC address of an ETHERNET-ISO88023 header
      • src_vlan - source VLAN of extended_switch structure
      • src_priority - source priority of extended_switch structure
      • src_mask_len - length of source mask of extended_router structure
      • dst_ip - destination IP address of IPv4 or IPv6 structures
      • dst_port - destination port of TCP or UDP structures
      • dst_port_name - name of the destination port
      • dst_mac - destination MAC address of an ETHERNET-ISO88023 header
      • dst_vlan - destination VLAN of extended_switch structure
      • dst_priority - destination priority extended_switch structure
      • dst_mask_len - length of destinationd mask of extended_router structure
      • next_hop - next hop of extended_router structure
      • ip_version - IP version of IPv4 or IPv6 structures
      • ip_protocol - IP protocol of IPv4 or IPv6 structures
      • ip_dscp - IP DSCP of IPv4 or IPv6 structures
      • ip_ecn - IP ECN of IPv4 or IPv6 structures
      • tcp_urgent_pointer - urgent pointer of TCP structure
    • fields:
      • bytes (int) - product of frame length and packets
      • drops (int) - drops field of flow_sample or flow_sample_expanded structures
      • packets (int) - sampling_rate field of flow_sample or flow_sample_expanded structures
      • frame_length (int) - frame_length field of sampled_header structures
      • header_size (int) - header_size field of sampled_header structures
      • ip_fragment_offset (int) - ip_ver field of IPv4 structures
      • ip_header_length (int) - ip_ver field of IPv4 structures
      • ip_total_length (int) - ip_total_len field of IPv4 structures
      • ip_ttl (int) - ip_ttl field of IPv4 structures or ip_hop_limit field IPv6 structures
      • tcp_header_length (int) - size field of TCP structure. This value is specified in 32-bit words. It must be multiplied by 4 to produce a valuein bytes.
      • tcp_window_size (int) - window_size field of TCP structure
      • udp_length (int) - length field of UDP structures
      • ip_flags (int) - ip_ver field of IPv4 structures
      • tcp_flags (int) - TCP flags of TCP IP header (IPv4 or IPv6)

Troubleshooting

The sflowtool utility can be used to print sFlow packets, and compared against the metrics produced by Telegraf.

sflowtool -p 6343

If opening an issue, in addition to the output of sflowtool it will also be helpful to collect a packet capture. Adjust the interface, host and port as needed:

sudo tcpdump -s 0 -i eth0 -w telegraf-sflow.pcap host 127.0.0.1 and port 6343

Example Output

sflow,agent_address=0.0.0.0,dst_ip=10.0.0.2,dst_mac=ff:ff:ff:ff:ff:ff,dst_port=40042,ether_type=IPv4,header_protocol=ETHERNET-ISO88023,input_ifindex=6,ip_dscp=27,ip_ecn=0,output_ifindex=1073741823,source_id_index=3,source_id_type=0,src_ip=10.0.0.1,src_mac=ff:ff:ff:ff:ff:ff,src_port=443 bytes=1570i,drops=0i,frame_length=157i,header_length=128i,ip_flags=2i,ip_fragment_offset=0i,ip_total_length=139i,ip_ttl=42i,sampling_rate=10i,tcp_header_length=0i,tcp_urgent_pointer=0i,tcp_window_size=14i 1584473704793580447

Was this page helpful?

Thank you for your feedback!


InfluxDB OSS 2.9.0: API tokens are hashed by default

Stronger token security in InfluxDB OSS 2.9.0 — tokens are hashed on disk by default. Existing tokens are hashed on first startup and can’t be recovered afterward. Capture any plaintext tokens you still need before you upgrade.

View InfluxDB OSS 2.9.0 release notes

Hashed tokens authenticate exactly like unhashed tokens — clients and integrations keep working.

Also new in 2.9.0:

  • Configurable backup compression
  • Restore support for backups containing hashed tokens
  • Tighter Edge Data Replication queue validation
  • Flux upgrade
  • Compaction reliability improvements

Key enhancements in Explorer 1.9

Explorer 1.9 is now available with InfluxQL support, an AI-assisted Flux to SQL converter (beta), and new live sample data simulators.

View Explorer 1.9 release notes

Explorer 1.9 includes new features and improvements that make it easier to query, visualize, and manage data.

Highlights:

  • Flux to SQL converter (beta): Convert Flux queries to SQL with an AI-assisted converter.
  • InfluxQL support: Query data with InfluxQL in the Data Explorer and dashboards, and save and load InfluxQL queries.
  • InfluxQL visualizations: Render line and bar charts from InfluxQL results with per-tag series grouping.
  • Query error history: Review a history of query errors in the query tool.
  • Live sample data simulators: Generate continuous live sample data with new bird data and signal generator simulators.

For more details, see Explorer 1.9 release notes

InfluxDB 3.10 is now available

InfluxDB 3 Core 3.10 adds an automatic catalog format upgrade, a configurable query-concurrency limit, and processing engine improvements.

Key updates in InfluxDB 3 Core 3.10:

  • Catalog format upgrade: the on-disk catalog automatically upgrades from format v2 to v3 on first 3.10 startup. Migration is one-way—back up your catalog before upgrading.
  • --max-concurrent-queries: limit concurrent queries (adjustable at runtime).
  • GET /ready endpoint for readiness probes.
  • Processing engine: cross-database queries and trigger lockdown flags.

For more information, see the InfluxDB 3 Core release notes.

InfluxDB 3.10 is now available

InfluxDB 3 Enterprise 3.10 adds automated backup and restore, row-level deletions, and user management, with an automatic catalog format upgrade and performance preview improvements.

Key updates in InfluxDB 3 Enterprise 3.10:

  • Catalog format upgrade: the on-disk catalog automatically upgrades from format v2 to v3 on first 3.10 startup. Migration is one-way—back up your catalog before upgrading.
  • Automated backup and restore (beta)
  • Row-level deletions
  • User management (authentication and RBAC) — preview
  • Performance preview improvements

Backup and restore, row-level deletions, and the performance preview require the Enterprise storage engine upgrade (opt-in beta). Beta and preview features are subject to breaking changes and aren’t recommended for production use.

For more information, see the InfluxDB 3 Enterprise release notes

Telegraf Enterprise is now generally available

Telegraf Enterprise is now generally available, along with Telegraf Controller v1.0.

Telegraf Enterprise combines Telegraf Controller, a centralized management console for Telegraf, with official support from InfluxData. Manage configurations, monitor fleet health, and operate tens of thousands of Telegraf agents from a single system.

InfluxDB Docker latest tag changing to InfluxDB 3 Core

On September 15, 2026, the latest tag for InfluxDB Docker images will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments.

If using Docker to install and run InfluxDB, the latest tag will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments. For example, if using Docker to run InfluxDB v2, replace the latest version tag with a specific version tag in your Docker pull command–for example:

docker pull influxdb:2