From 887f208f5d43e8a780817e70f83890445a17b966 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Thu, 4 Jan 2024 14:14:20 +0200 Subject: [PATCH] source/network: discover speed of virtual network interfaces --- docs/usage/customization-guide.md | 2 +- source/network/network.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/usage/customization-guide.md b/docs/usage/customization-guide.md index f28d8435c..86be11269 100644 --- a/docs/usage/customization-guide.md +++ b/docs/usage/customization-guide.md @@ -968,7 +968,7 @@ The following features are available for matching: | | | **``** | string | Sysfs network interface attribute, available attributes: `operstate`, `speed`, `sriov_numvfs`, `sriov_totalvfs` | | **`network.virtual`** | instance | | | Virtual network interfaces present in the system | | | | **`name`** | string | Name of the network interface | -| | | **``** | string | Sysfs network interface attribute, available attributes: `operstate` | +| | | **``** | string | Sysfs network interface attribute, available attributes: `operstate`, `speed` | | **`pci.device`** | instance | | | PCI devices present in the system | | | | **``** | string | Value of the sysfs device attribute, available attributes: `class`, `vendor`, `device`, `subsystem_vendor`, `subsystem_device`, `sriov_totalvfs`, `iommu_group/type`, `iommu/intel-iommu/version` | | **`storage.block`** | instance | | | Block storage devices present in the system | diff --git a/source/network/network.go b/source/network/network.go index f916289b7..5dc5f0203 100644 --- a/source/network/network.go +++ b/source/network/network.go @@ -60,7 +60,7 @@ var ( devIfaceAttrs = []string{"operstate", "speed", "device/sriov_numvfs", "device/sriov_totalvfs"} // virtualIfaceAttrs is the list of files under /sys/class/net/ that we're reading - virtualIfaceAttrs = []string{"operstate"} + virtualIfaceAttrs = []string{"operstate", "speed"} ) // Name returns an identifier string for this feature source.