diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 48f3b27..80fc213 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -53,6 +53,8 @@ jobs: curl --fail http://127.0.0.1:9091/api/v1/query?query=dns_query_result_code | grep dns_query_result_code curl --fail http://127.0.0.1:9091/api/v1/query?query=ethtool_duplex | grep ethtool_duplex curl --fail http://127.0.0.1:9091/api/v1/query?query=kernel_boot_time_total | grep kernel_boot_time_total + curl --fail http://127.0.0.1:9091/api/v1/query?query=nfsstat_bytes | grep nfsstat_bytes + curl --fail http://127.0.0.1:9091/api/v1/query?query=bond_status | grep bond_status - name: Logs if: always() diff --git a/README.md b/README.md index a836584..3509f89 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,8 @@ curl --fail http://127.0.0.1:9091/api/v1/query?query=netstat_tcp_listen | grep n curl --fail http://127.0.0.1:9091/api/v1/query?query=dns_query_result_code | grep dns_query_result_code curl --fail http://127.0.0.1:9091/api/v1/query?query=ethtool_duplex | grep ethtool_duplex curl --fail http://127.0.0.1:9091/api/v1/query?query=kernel_boot_time_total | grep kernel_boot_time_total +curl --fail http://127.0.0.1:9091/api/v1/query?query=nfsstat_bytes | grep nfsstat_bytes +curl --fail http://127.0.0.1:9091/api/v1/query?query=bond_status | grep bond_status ``` ## Running example diff --git a/config/telegraf.conf b/config/telegraf.conf index d0d5b77..cc30591 100644 --- a/config/telegraf.conf +++ b/config/telegraf.conf @@ -4,6 +4,11 @@ password = "password123456" computer_system_id="437XR1138R2" +[[inputs.nfsclient]] + +[[inputs.bond]] + host_proc = "/host/proc" + [[inputs.http]] urls = ["http://spdk:9009"] headers = {"Content-Type" = "application/json"} diff --git a/config/testdata/bonding/bond0 b/config/testdata/bonding/bond0 new file mode 100644 index 0000000..11f1d4b --- /dev/null +++ b/config/testdata/bonding/bond0 @@ -0,0 +1,8 @@ +=Ethernet Channel Bonding Driver: v6.1.112+ + +Bonding Mode: load balancing (round-robin) +MII Status: down +MII Polling Interval (ms): 0 +Up Delay (ms): 0 +Down Delay (ms): 0 +Peer Notification Delay (ms): 0 diff --git a/config/testdata/mountstats b/config/testdata/mountstats new file mode 100644 index 0000000..e986608 --- /dev/null +++ b/config/testdata/mountstats @@ -0,0 +1,14 @@ +device nfs-server:/export/path mounted on /mnt/nfs with fstype nfs4 statvers=1.1 +opts: vers=4.1,proto=tcp,port=2049,sec=sys,clientaddr=192.168.1.100 +age: 1234567 +impl_id: name='kernel' domain='localdomain' date='2024-11-01' time='00:00:00' +bytes: read=234567890 write=1234567 directread=0 directwrite=0 serverread=0 serverwrite=0 +events: inoderevalidates=12345 dentryrevalidates=23456 datainvalidates=3456 attrinvalidates=4567 vfsopen=789 vfslookup=1234 + vfsupdatepage=3456 vfsreadpage=4567 vfsreadpages=5678 vfswritepage=6789 vfswritepages=7890 vfsgetdents=890 + vfssetattr=234 vfsflush=1235 vfsfsync=5672 vfslock=345 vfsrelease=0 congestion_wait=0 setattrtrunc=0 setattrnontrunc=123 + open_reclaim=0 short_rpcs=0 delay=0 +per-op statistics + NULL: 0 calls 0 retrans 0 bytes sent 0 bytes recv 0 queue time 0.000 ms + READ: 100 calls 0 retrans 5000 bytes sent 10000 bytes recv 10 queue time 1.234 ms + WRITE: 50 calls 0 retrans 2500 bytes sent 5000 bytes recv 5 queue time 2.345 ms + COMMIT: 10 calls 1 retrans 1000 bytes sent 2000 bytes recv 2 queue time 3.456 ms diff --git a/docker-compose.yml b/docker-compose.yml index 70cab32..b0a846c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,9 +43,12 @@ services: volumes: - /:/hostfs:ro - ./config/telegraf.conf:/etc/telegraf/telegraf.conf:ro + - ./config/testdata/bonding:/host/proc/net/bonding + - ./config/testdata/mountstats:/host/proc/self/mountstats:ro environment: - HOST_MOUNT_PREFIX=/hostfs - HOST_PROC=/hostfs/proc + - MOUNT_PROC=/host/proc/self/mountstats depends_on: - spdk - influxdb