Skip to content

Commit

Permalink
feat: adding bond and nfsclient
Browse files Browse the repository at this point in the history
Signed-off-by: Mohamed Asif <[email protected]>

feat: adding bond and nfsclient

Signed-off-by: mohamedasifs123 <[email protected]>

Update docker-publish.yml

Signed-off-by: mohamedasifs123 <[email protected]>

feat: adding query examples for bond and nfs

Signed-off-by: mohamedasifs123 <[email protected]>

fix: adding bond path

Signed-off-by: mohamedasifs123 <[email protected]>

feat: adding volumes for mountstat and bond

Signed-off-by: mohamedasifs123 <[email protected]>

feat: create bond testdata for bond

Signed-off-by: mohamedasifs123 <[email protected]>

feat: create mountstats testdata for nfsclient

Signed-off-by: mohamedasifs123 <[email protected]>

feat: adding snmp

Signed-off-by: mohamedasifs123 <[email protected]>

feat: adding bond snmp and nfsclient metrics

Signed-off-by: mohamedasifs123 <[email protected]>
  • Loading branch information
mohamedasifs123 committed Feb 19, 2025
1 parent e95eb91 commit 186030a
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions config/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
8 changes: 8 additions & 0 deletions config/testdata/bonding/bond0
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions config/testdata/mountstats
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 186030a

Please sign in to comment.