Skip to content

Commit 69f5009

Browse files
committed
Add MTU attribute for physical and virtual devices
Signed-off-by: Marcin Franczyk <[email protected]>
1 parent 216fca7 commit 69f5009

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/usage/customization-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -968,10 +968,10 @@ The following features are available for matching:
968968
| | | **`enabled`** | bool | `true` if swap partition detected, `false` otherwise |
969969
| **`network.device`** | instance | | | Physical (non-virtual) network interfaces present in the system |
970970
| | | **`name`** | string | Name of the network interface |
971-
| | | **`<sysfs-attribute>`** | string | Sysfs network interface attribute, available attributes: `operstate`, `speed`, `sriov_numvfs`, `sriov_totalvfs` |
971+
| | | **`<sysfs-attribute>`** | string | Sysfs network interface attribute, available attributes: `operstate`, `speed`, `sriov_numvfs`, `sriov_totalvfs`, `mtu` |
972972
| **`network.virtual`** | instance | | | Virtual network interfaces present in the system |
973973
| | | **`name`** | string | Name of the network interface |
974-
| | | **`<sysfs-attribute>`** | string | Sysfs network interface attribute, available attributes: `operstate`, `speed` |
974+
| | | **`<sysfs-attribute>`** | string | Sysfs network interface attribute, available attributes: `operstate`, `speed`, `mtu` |
975975
| **`pci.device`** | instance | | | PCI devices present in the system |
976976
| | | **`<sysfs-attribute>`** | 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` |
977977
| **`storage.block`** | instance | | | Block storage devices present in the system |

source/network/network.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ var (
6060

6161
var (
6262
// devIfaceAttrs is the list of files under /sys/class/net/<iface> that we're reading
63-
devIfaceAttrs = []string{"operstate", "speed", "device/sriov_numvfs", "device/sriov_totalvfs"}
63+
devIfaceAttrs = []string{"operstate", "speed", "device/sriov_numvfs", "device/sriov_totalvfs", "mtu"}
6464

6565
// virtualIfaceAttrs is the list of files under /sys/class/net/<iface> that we're reading
66-
virtualIfaceAttrs = []string{"operstate", "speed"}
66+
virtualIfaceAttrs = []string{"operstate", "speed", "mtu"}
6767
)
6868

6969
// Name returns an identifier string for this feature source.

0 commit comments

Comments
 (0)