Skip to content

Commit 186030a

Browse files
feat: adding bond and nfsclient
Signed-off-by: Mohamed Asif <142201466+mohamedasifs123@users.noreply.github.com> feat: adding bond and nfsclient Signed-off-by: mohamedasifs123 <asifabu272@gmail.com> Update docker-publish.yml Signed-off-by: mohamedasifs123 <142201466+mohamedasifs123@users.noreply.github.com> feat: adding query examples for bond and nfs Signed-off-by: mohamedasifs123 <142201466+mohamedasifs123@users.noreply.github.com> fix: adding bond path Signed-off-by: mohamedasifs123 <142201466+mohamedasifs123@users.noreply.github.com> feat: adding volumes for mountstat and bond Signed-off-by: mohamedasifs123 <142201466+mohamedasifs123@users.noreply.github.com> feat: create bond testdata for bond Signed-off-by: mohamedasifs123 <142201466+mohamedasifs123@users.noreply.github.com> feat: create mountstats testdata for nfsclient Signed-off-by: mohamedasifs123 <142201466+mohamedasifs123@users.noreply.github.com> feat: adding snmp Signed-off-by: mohamedasifs123 <142201466+mohamedasifs123@users.noreply.github.com> feat: adding bond snmp and nfsclient metrics Signed-off-by: mohamedasifs123 <142201466+mohamedasifs123@users.noreply.github.com>
1 parent e95eb91 commit 186030a

File tree

6 files changed

+34
-0
lines changed

6 files changed

+34
-0
lines changed

.github/workflows/docker-publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ jobs:
5353
curl --fail http://127.0.0.1:9091/api/v1/query?query=dns_query_result_code | grep dns_query_result_code
5454
curl --fail http://127.0.0.1:9091/api/v1/query?query=ethtool_duplex | grep ethtool_duplex
5555
curl --fail http://127.0.0.1:9091/api/v1/query?query=kernel_boot_time_total | grep kernel_boot_time_total
56+
curl --fail http://127.0.0.1:9091/api/v1/query?query=nfsstat_bytes | grep nfsstat_bytes
57+
curl --fail http://127.0.0.1:9091/api/v1/query?query=bond_status | grep bond_status
5658
5759
- name: Logs
5860
if: always()

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ curl --fail http://127.0.0.1:9091/api/v1/query?query=netstat_tcp_listen | grep n
119119
curl --fail http://127.0.0.1:9091/api/v1/query?query=dns_query_result_code | grep dns_query_result_code
120120
curl --fail http://127.0.0.1:9091/api/v1/query?query=ethtool_duplex | grep ethtool_duplex
121121
curl --fail http://127.0.0.1:9091/api/v1/query?query=kernel_boot_time_total | grep kernel_boot_time_total
122+
curl --fail http://127.0.0.1:9091/api/v1/query?query=nfsstat_bytes | grep nfsstat_bytes
123+
curl --fail http://127.0.0.1:9091/api/v1/query?query=bond_status | grep bond_status
122124
```
123125

124126
## Running example

config/telegraf.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
password = "password123456"
55
computer_system_id="437XR1138R2"
66

7+
[[inputs.nfsclient]]
8+
9+
[[inputs.bond]]
10+
host_proc = "/host/proc"
11+
712
[[inputs.http]]
813
urls = ["http://spdk:9009"]
914
headers = {"Content-Type" = "application/json"}

config/testdata/bonding/bond0

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
=Ethernet Channel Bonding Driver: v6.1.112+
2+
3+
Bonding Mode: load balancing (round-robin)
4+
MII Status: down
5+
MII Polling Interval (ms): 0
6+
Up Delay (ms): 0
7+
Down Delay (ms): 0
8+
Peer Notification Delay (ms): 0

config/testdata/mountstats

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
device nfs-server:/export/path mounted on /mnt/nfs with fstype nfs4 statvers=1.1
2+
opts: vers=4.1,proto=tcp,port=2049,sec=sys,clientaddr=192.168.1.100
3+
age: 1234567
4+
impl_id: name='kernel' domain='localdomain' date='2024-11-01' time='00:00:00'
5+
bytes: read=234567890 write=1234567 directread=0 directwrite=0 serverread=0 serverwrite=0
6+
events: inoderevalidates=12345 dentryrevalidates=23456 datainvalidates=3456 attrinvalidates=4567 vfsopen=789 vfslookup=1234
7+
vfsupdatepage=3456 vfsreadpage=4567 vfsreadpages=5678 vfswritepage=6789 vfswritepages=7890 vfsgetdents=890
8+
vfssetattr=234 vfsflush=1235 vfsfsync=5672 vfslock=345 vfsrelease=0 congestion_wait=0 setattrtrunc=0 setattrnontrunc=123
9+
open_reclaim=0 short_rpcs=0 delay=0
10+
per-op statistics
11+
NULL: 0 calls 0 retrans 0 bytes sent 0 bytes recv 0 queue time 0.000 ms
12+
READ: 100 calls 0 retrans 5000 bytes sent 10000 bytes recv 10 queue time 1.234 ms
13+
WRITE: 50 calls 0 retrans 2500 bytes sent 5000 bytes recv 5 queue time 2.345 ms
14+
COMMIT: 10 calls 1 retrans 1000 bytes sent 2000 bytes recv 2 queue time 3.456 ms

docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@ services:
4343
volumes:
4444
- /:/hostfs:ro
4545
- ./config/telegraf.conf:/etc/telegraf/telegraf.conf:ro
46+
- ./config/testdata/bonding:/host/proc/net/bonding
47+
- ./config/testdata/mountstats:/host/proc/self/mountstats:ro
4648
environment:
4749
- HOST_MOUNT_PREFIX=/hostfs
4850
- HOST_PROC=/hostfs/proc
51+
- MOUNT_PROC=/host/proc/self/mountstats
4952
depends_on:
5053
- spdk
5154
- influxdb

0 commit comments

Comments
 (0)