Skip to content

Commit

Permalink
Add NFS Server metrics collector. (#803)
Browse files Browse the repository at this point in the history
* Add NFS Server metrics collector.

* Add File Handles metrics.

* Add nfsd IO stats.

* Add metrics for NFSd threads.

* Add metrics for NFSd read ahead cache.

* Add NFSd network traffic counters.

* Add RPC metrics.

* Add V2 requests metrics.

* Add NFSv3 metrics.

* Add NFSv4 metrics.

* Update reply cache comment.

* Update help text.
  • Loading branch information
SuperQ authored Feb 12, 2018
1 parent 9a5bd5f commit 6a04169
Show file tree
Hide file tree
Showing 4 changed files with 520 additions and 0 deletions.
116 changes: 116 additions & 0 deletions collector/fixtures/e2e-output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2576,6 +2576,121 @@ node_nfs_rpc_operations 1.218785755e+09
# HELP node_nfs_rpc_retransmissions Number of RPC transmissions performed.
# TYPE node_nfs_rpc_retransmissions counter
node_nfs_rpc_retransmissions 374636
# HELP node_nfsd_connections_total Total number of NFSd TCP connections.
# TYPE node_nfsd_connections_total counter
node_nfsd_connections_total 1
# HELP node_nfsd_disk_bytes_read_total Total NFSd bytes read.
# TYPE node_nfsd_disk_bytes_read_total counter
node_nfsd_disk_bytes_read_total 1.572864e+08
# HELP node_nfsd_disk_bytes_written_total Total NFSd bytes written.
# TYPE node_nfsd_disk_bytes_written_total counter
node_nfsd_disk_bytes_written_total 72864
# HELP node_nfsd_file_handles_stale_total Total number of NFSd stale file handles
# TYPE node_nfsd_file_handles_stale_total counter
node_nfsd_file_handles_stale_total 0
# HELP node_nfsd_packets_total Total NFSd network packets (sent+recieved) by protocol type.
# TYPE node_nfsd_packets_total counter
node_nfsd_packets_total{proto="tcp"} 917
node_nfsd_packets_total{proto="udp"} 55
# HELP node_nfsd_read_ahead_cache_not_found_total Total number of NFSd read ahead cache not found.
# TYPE node_nfsd_read_ahead_cache_not_found_total counter
node_nfsd_read_ahead_cache_not_found_total 0
# HELP node_nfsd_read_ahead_cache_size_blocks How large the read ahead cache is in blocks.
# TYPE node_nfsd_read_ahead_cache_size_blocks gauge
node_nfsd_read_ahead_cache_size_blocks 32
# HELP node_nfsd_reply_cache_hits_total Total number of NFSd Reply Cache hits (client lost server response).
# TYPE node_nfsd_reply_cache_hits_total counter
node_nfsd_reply_cache_hits_total 0
# HELP node_nfsd_reply_cache_misses_total Total number of NFSd Reply Cache an operation that requires caching (idempotent).
# TYPE node_nfsd_reply_cache_misses_total counter
node_nfsd_reply_cache_misses_total 6
# HELP node_nfsd_reply_cache_nocache_total Total number of NFSd Reply Cache non-idempotent operations (rename/delete/…).
# TYPE node_nfsd_reply_cache_nocache_total counter
node_nfsd_reply_cache_nocache_total 18622
# HELP node_nfsd_requests_total Total number NFSd Requests by method and protocol.
# TYPE node_nfsd_requests_total counter
node_nfsd_requests_total{method="Access",proto="v3"} 111
node_nfsd_requests_total{method="Access",proto="v4"} 1098
node_nfsd_requests_total{method="Close",proto="v4"} 2
node_nfsd_requests_total{method="Commit",proto="v3"} 0
node_nfsd_requests_total{method="Commit",proto="v4"} 0
node_nfsd_requests_total{method="Create",proto="v2"} 0
node_nfsd_requests_total{method="Create",proto="v3"} 0
node_nfsd_requests_total{method="Create",proto="v4"} 0
node_nfsd_requests_total{method="DelegPurge",proto="v4"} 0
node_nfsd_requests_total{method="DelegReturn",proto="v4"} 0
node_nfsd_requests_total{method="FsInfo",proto="v3"} 2
node_nfsd_requests_total{method="FsStat",proto="v2"} 2
node_nfsd_requests_total{method="FsStat",proto="v3"} 0
node_nfsd_requests_total{method="GetAttr",proto="v2"} 69
node_nfsd_requests_total{method="GetAttr",proto="v3"} 112
node_nfsd_requests_total{method="GetAttr",proto="v4"} 8179
node_nfsd_requests_total{method="GetFH",proto="v4"} 5896
node_nfsd_requests_total{method="Link",proto="v2"} 0
node_nfsd_requests_total{method="Link",proto="v3"} 0
node_nfsd_requests_total{method="Link",proto="v4"} 0
node_nfsd_requests_total{method="Lock",proto="v4"} 0
node_nfsd_requests_total{method="Lockt",proto="v4"} 0
node_nfsd_requests_total{method="Locku",proto="v4"} 0
node_nfsd_requests_total{method="Lookup",proto="v2"} 4410
node_nfsd_requests_total{method="Lookup",proto="v3"} 2719
node_nfsd_requests_total{method="Lookup",proto="v4"} 5900
node_nfsd_requests_total{method="LookupRoot",proto="v4"} 0
node_nfsd_requests_total{method="MkDir",proto="v2"} 0
node_nfsd_requests_total{method="MkDir",proto="v3"} 0
node_nfsd_requests_total{method="MkNod",proto="v3"} 0
node_nfsd_requests_total{method="Nverify",proto="v4"} 0
node_nfsd_requests_total{method="Open",proto="v4"} 2
node_nfsd_requests_total{method="OpenAttr",proto="v4"} 0
node_nfsd_requests_total{method="OpenConfirm",proto="v4"} 2
node_nfsd_requests_total{method="OpenDgrd",proto="v4"} 0
node_nfsd_requests_total{method="PathConf",proto="v3"} 1
node_nfsd_requests_total{method="PutFH",proto="v4"} 9609
node_nfsd_requests_total{method="Read",proto="v2"} 0
node_nfsd_requests_total{method="Read",proto="v3"} 0
node_nfsd_requests_total{method="Read",proto="v4"} 150
node_nfsd_requests_total{method="ReadDir",proto="v2"} 99
node_nfsd_requests_total{method="ReadDir",proto="v3"} 27
node_nfsd_requests_total{method="ReadDir",proto="v4"} 1272
node_nfsd_requests_total{method="ReadDirPlus",proto="v3"} 216
node_nfsd_requests_total{method="ReadLink",proto="v2"} 0
node_nfsd_requests_total{method="ReadLink",proto="v3"} 0
node_nfsd_requests_total{method="ReadLink",proto="v4"} 0
node_nfsd_requests_total{method="RelLockOwner",proto="v4"} 0
node_nfsd_requests_total{method="Remove",proto="v2"} 0
node_nfsd_requests_total{method="Remove",proto="v3"} 0
node_nfsd_requests_total{method="Remove",proto="v4"} 0
node_nfsd_requests_total{method="Rename",proto="v2"} 0
node_nfsd_requests_total{method="Rename",proto="v3"} 0
node_nfsd_requests_total{method="Rename",proto="v4"} 0
node_nfsd_requests_total{method="Renew",proto="v4"} 1236
node_nfsd_requests_total{method="RestoreFH",proto="v4"} 0
node_nfsd_requests_total{method="RmDir",proto="v2"} 0
node_nfsd_requests_total{method="RmDir",proto="v3"} 0
node_nfsd_requests_total{method="Root",proto="v2"} 0
node_nfsd_requests_total{method="SaveFH",proto="v4"} 0
node_nfsd_requests_total{method="SecInfo",proto="v4"} 0
node_nfsd_requests_total{method="SetAttr",proto="v2"} 0
node_nfsd_requests_total{method="SetAttr",proto="v3"} 0
node_nfsd_requests_total{method="SetAttr",proto="v4"} 0
node_nfsd_requests_total{method="SymLink",proto="v2"} 0
node_nfsd_requests_total{method="SymLink",proto="v3"} 0
node_nfsd_requests_total{method="Verify",proto="v4"} 3
node_nfsd_requests_total{method="WrCache",proto="v2"} 0
node_nfsd_requests_total{method="Write",proto="v2"} 0
node_nfsd_requests_total{method="Write",proto="v3"} 0
node_nfsd_requests_total{method="Write",proto="v4"} 3
# HELP node_nfsd_rpc_errors_total Total number of NFSd RPC errors by error type.
# TYPE node_nfsd_rpc_errors_total counter
node_nfsd_rpc_errors_total{error="auth"} 2
node_nfsd_rpc_errors_total{error="cInt"} 0
node_nfsd_rpc_errors_total{error="fmt"} 1
# HELP node_nfsd_server_rpcs_total Total number of NFSd RPCs.
# TYPE node_nfsd_server_rpcs_total gauge
node_nfsd_server_rpcs_total 18628
# HELP node_nfsd_server_threads Total number of NFSd kernel threads that are running.
# TYPE node_nfsd_server_threads gauge
node_nfsd_server_threads 8
# HELP node_procs_blocked Number of processes blocked waiting for I/O to complete.
# TYPE node_procs_blocked gauge
node_procs_blocked 0
Expand Down Expand Up @@ -2630,6 +2745,7 @@ node_scrape_collector_success{collector="mountstats"} 1
node_scrape_collector_success{collector="netdev"} 1
node_scrape_collector_success{collector="netstat"} 1
node_scrape_collector_success{collector="nfs"} 1
node_scrape_collector_success{collector="nfsd"} 1
node_scrape_collector_success{collector="qdisc"} 1
node_scrape_collector_success{collector="sockstat"} 1
node_scrape_collector_success{collector="stat"} 1
Expand Down
11 changes: 11 additions & 0 deletions collector/fixtures/proc/net/rpc/nfsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
rc 0 6 18622
fh 0 0 0 0 0
io 157286400 72864
th 8 0 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
ra 32 0 0 0 0 0 0 0 0 0 0 0
net 972 55 917 1
rpc 18628 3 1 2 0
proc2 18 2 69 0 0 4410 0 0 0 0 0 0 0 0 0 0 0 99 2
proc3 22 2 112 0 2719 111 0 0 0 0 0 0 0 0 0 0 0 27 216 0 2 1 0
proc4 2 2 10853
proc4ops 72 0 0 0 1098 2 0 0 0 0 8179 5896 0 0 0 0 5900 0 0 2 0 2 0 9609 0 2 150 1272 0 0 0 1236 0 0 0 0 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Loading

0 comments on commit 6a04169

Please sign in to comment.