Difference between revisions of "Plugin:Netlink"
(Remove the "Plugins requiring privileges" after feedback from Bruno Prémont.) |
Kwiatrowski (talk | contribs) (Add history for CollectVFStats) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
* The <em>verbose</em> interface statistics give you all the other details that are available: Number of dropped packets, number of multicast packets, and RX- and TX-errors by error types. Under Linux, you cannot get any more verbose than that. These statistics basically correspond to the values returned by: | * The <em>verbose</em> interface statistics give you all the other details that are available: Number of dropped packets, number of multicast packets, and RX- and TX-errors by error types. Under Linux, you cannot get any more verbose than that. These statistics basically correspond to the values returned by: | ||
# ip -s -s link list | # ip -s -s link list | ||
+ | |||
+ | It is possible to use regular expressions to match interface names, if the name is surrounded by I</.../> and collectd was compiled with support for regexps. This is useful if there's a need to collect (or ignore) data for a group of interfaces that are similarly named, without the need to explicitly list all of them (especially useful if the list is dynamic). | ||
+ | Example: | ||
+ | |||
+ | <Plugin "netlink"> | ||
+ | Interface "/^eth/" | ||
+ | Interface "/^ens[1-4]$|^enp[0-3]$/" | ||
+ | VerboseInterface "/^eno[0-9]+/" | ||
+ | </Plugin> | ||
But extended interface statistics is not all. The <em>Netlink</em> plugin can also gather statistics from Linux' ''traffic control subsystem'', i. e. the bytes and packets that passed a certain ''qdisc'', ''class'', or ''filter''. I'm afraid there is no one sentence answer to what all that is, but there's an [http://www.docum.org/docum.org/faq/cache/16.html article in the LARTC HowTo] which tries to explain that. If you have a traffic shaping or ''Quality of Service'' (QoS) setup and you need or want to know how much traffic is going over which ''qdisc'' or ''class'', this is the right plugin for you. | But extended interface statistics is not all. The <em>Netlink</em> plugin can also gather statistics from Linux' ''traffic control subsystem'', i. e. the bytes and packets that passed a certain ''qdisc'', ''class'', or ''filter''. I'm afraid there is no one sentence answer to what all that is, but there's an [http://www.docum.org/docum.org/faq/cache/16.html article in the LARTC HowTo] which tries to explain that. If you have a traffic shaping or ''Quality of Service'' (QoS) setup and you need or want to know how much traffic is going over which ''qdisc'' or ''class'', this is the right plugin for you. | ||
Graphing ''filters'' is a bit troublesome: ''Filters'' don't have an ID of their own, so the parent's ID (i.e. the QDisc's handle, since filters always belong to a ''QDisc'', classes cannot have filters attached to them) is used. This may not result in a unique name if there is more than one ''filter'' attached to that ''qdisc'' or ''class''. If you want to get statistics about different traffic types, please have a look at the [[Plugin:IPTables|IP-Tables]] plugin. | Graphing ''filters'' is a bit troublesome: ''Filters'' don't have an ID of their own, so the parent's ID (i.e. the QDisc's handle, since filters always belong to a ''QDisc'', classes cannot have filters attached to them) is used. This may not result in a unique name if there is more than one ''filter'' attached to that ''qdisc'' or ''class''. If you want to get statistics about different traffic types, please have a look at the [[Plugin:IPTables|IP-Tables]] plugin. | ||
+ | |||
+ | If ''CollectVFStats'' is set to true plugin collects VF's statistics for Virtual Functions available for interfaces specified in B<Interface> or B<VerboseInterface>. All available stats are collected no matter if parent interface is set by B<Interface> or B<VerboseInterface>. | ||
== Synopsis == | == Synopsis == | ||
Line 32: | Line 43: | ||
Filter "ppp0" "u32-1:0" | Filter "ppp0" "u32-1:0" | ||
IgnoreSelected false | IgnoreSelected false | ||
+ | CollectVFStats true | ||
</Plugin> | </Plugin> | ||
+ | |||
+ | == History == | ||
+ | |||
+ | * ''CollectVFStats'' option is available since release {{Version|5.12}}. | ||
== Example graphs == | == Example graphs == | ||
Line 44: | Line 60: | ||
* Linux 2.4 or later | * Linux 2.4 or later | ||
− | * <code> | + | * <code>libmnl</code> |
[[Category:Plugins]] | [[Category:Plugins]] | ||
{{DEFAULTSORT:Netlink}} | {{DEFAULTSORT:Netlink}} |
Latest revision as of 16:57, 4 September 2020
Netlink plugin | |
---|---|
Type: | read |
Callbacks: | config, init, read, shutdown |
Status: | supported |
First version: | 4.1 |
Copyright: | 2007 Florian octo Forster |
License: | GPLv2 |
Manpage: | collectd.conf(5) |
List of Plugins |
Description
The Netlink plugin will open a netlink socket to the Linux kernel and use it to get statistics for interfaces, qdiscs, classes, and, if you can make use of it, filters. Since in most setups many of the statistics this plugin can collect aren't of interest, you can select which information to gather using the configuration. The details are documented in the collectd.conf(5) manpage.
The interface statistics has been split up in two parts:
- The normal interface statistics include exactly the same information as is collected by the Interface plugin – it's only collected in another way.
- The verbose interface statistics give you all the other details that are available: Number of dropped packets, number of multicast packets, and RX- and TX-errors by error types. Under Linux, you cannot get any more verbose than that. These statistics basically correspond to the values returned by:
# ip -s -s link list
It is possible to use regular expressions to match interface names, if the name is surrounded by I</.../> and collectd was compiled with support for regexps. This is useful if there's a need to collect (or ignore) data for a group of interfaces that are similarly named, without the need to explicitly list all of them (especially useful if the list is dynamic). Example:
<Plugin "netlink"> Interface "/^eth/" Interface "/^ens[1-4]$|^enp[0-3]$/" VerboseInterface "/^eno[0-9]+/" </Plugin>
But extended interface statistics is not all. The Netlink plugin can also gather statistics from Linux' traffic control subsystem, i. e. the bytes and packets that passed a certain qdisc, class, or filter. I'm afraid there is no one sentence answer to what all that is, but there's an article in the LARTC HowTo which tries to explain that. If you have a traffic shaping or Quality of Service (QoS) setup and you need or want to know how much traffic is going over which qdisc or class, this is the right plugin for you.
Graphing filters is a bit troublesome: Filters don't have an ID of their own, so the parent's ID (i.e. the QDisc's handle, since filters always belong to a QDisc, classes cannot have filters attached to them) is used. This may not result in a unique name if there is more than one filter attached to that qdisc or class. If you want to get statistics about different traffic types, please have a look at the IP-Tables plugin.
If CollectVFStats is set to true plugin collects VF's statistics for Virtual Functions available for interfaces specified in B<Interface> or B<VerboseInterface>. All available stats are collected no matter if parent interface is set by B<Interface> or B<VerboseInterface>.
Synopsis
<Plugin "netlink"> Interface "eth0" Interface "ppp0" VerboseInterface "ppp0" QDisc "ppp0" Class "ppp0" "htb-1:10" Filter "ppp0" "u32-1:0" IgnoreSelected false CollectVFStats true </Plugin>
History
- CollectVFStats option is available since release 5.12.
Example graphs
Dependencies
- Linux 2.4 or later
-
libmnl