about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2024-08-24 17:27:48 +0200
committerLeah Neukirchen <leah@vuxu.org>2024-08-24 17:27:48 +0200
commit9d073ad735613d8ef2384445ddfba11f0ee727db (patch)
tree3aef6c57c040dc55aaf459389461799996a6769e
parentc161af6df90ff5bbcbb0bc8186b4cd1e6078e4dd (diff)
downloadnano-exporter-9d073ad735613d8ef2384445ddfba11f0ee727db.tar.gz
nano-exporter-9d073ad735613d8ef2384445ddfba11f0ee727db.tar.xz
nano-exporter-9d073ad735613d8ef2384445ddfba11f0ee727db.zip
netif: export node_network_mtu_bytes HEAD master
-rw-r--r--netif.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/netif.c b/netif.c
index c732acc..0434520 100644
--- a/netif.c
+++ b/netif.c
@@ -33,6 +33,9 @@ static void netif_collect_dir(scrape_req *req, char *dir) {
     LABEL_END,
   };
 
+  if (read_file_at(dirfd, "mtu", buf, sizeof buf) > 0)
+    scrape_write(req, "node_network_mtu_bytes", dev_label, atof(buf));
+
   if (read_file_at(dirfd, "carrier", buf, sizeof buf) > 0) {
     scrape_write(req, "node_network_carrier", dev_label, atof(buf));