Net Monitoring
Use This InfluxDB Integration for FreeWhy use the Net Telegraf Plugin?
Monitoring your network interface helps you proactively track interfaces and get detailed real-time reports on utilization, traffic and various interface parameters. You are able to do this by collecting and monitoring metrics such as bandwidth (utilization), errors and discard rate.
How to monitor Net using the Telegraf plugin
The Net Telegraf Plugin gathers metrics about network interface and protocol usage (Linux only). By default, Telegraf gathers stats from any up interface (excluding loopback). The setting interfaces will tell Telegraf to gather these explicit interfaces, regardless of status. When specifying an interface, glob-style patterns are also supported. On Linux, Telegraf also collects protocol stats.
Key Net metrics to use for monitoring
Some of the important Net metrics that you should proactively monitor include:
bytes_sent
- The total number of bytes sent by the interfacebytes_recv
- The total number of bytes received by the interfacepackets_sent
- The total number of packets sent by the interfacepackets_recv
- The total number of packets received by the interfaceerr_in
- The total number of receive errors detected by the interfaceerr_out
- The total number of transmit errors detected by the interfacedrop_in
- The total number of received packets dropped by the interfacedrop_out
- The total number of transmitted packets dropped by the interface
Different platforms gather the data above with different mechanisms. Telegraf uses the (gopsutil) package, which under Linux reads the /proc/net/dev
file. Under freebsd/openbsd and darwin, the plugin uses netstat.
Additionally, for the time being only under Linux, the plugin gathers system-wide stats for different network protocols using /proc/net/snmp
(tcp, udp, icmp, etc.). Explanation of the different metrics exposed by snmp is out of the scope of this document. The best way to find information would be tracing the constants in the Linux kernel source here and their usage. If /proc/net/snmp
cannot be read for some reason, Telegraf ignores the error silently.
Tags:
- Net measurements have the following tags:
- interface (the interface from which metrics are gathered)
Under Linux, the system-wide protocol metrics have the interface=all tag.