Getting I/O of NFS mount by mountpoint.

245 views
Skip to first unread message

Yagyansh S. Kumar

unread,
Mar 10, 2020, 6:43:29 AM3/10/20
to Prometheus Users
Hi. I have a system where multiple NFS' are mounted across servers. I want the total Input and Output operations of the NFS mount based on the mountpoint(Eg. I have a NFS mounted at /data which is mounted on 100 servers. Now, I want I/O of mountpoint /data.) I have checked the stats scraped by nfs and nfsd collectors and they are useful but I am not able to make sense of those to get Input and Output operations.
Can someone help?
Thanks!

Cameron Kerr

unread,
Mar 16, 2020, 5:05:49 AM3/16/20
to Prometheus Users
Hi Yagyansh,

What you are after would appear to be the Prometheus equivalent of the nfsiostat command, and you can find this embodied within node_exporter's mountstats module:

eg.

./node_exporter --collector.nfs --collector.mountstats


This will pull data from /proc/self/mountstats, which is where nfsiostat gets its data from.

Things to bear in mind: autofs/automount will cause filesystems to go missing from your data when not mounted, which may interfere with you ability to alert.

Also, consider what may happen if processes get stuck (process state 'D') waiting for an unresponsive NFS server.

I'd quite like to be able to monitor the number of processes with 'D' state... which you can do with --collector.processes (I think that may be fairly new, so check your release)

# HELP node_processes_state Number of processes in each state.
# TYPE node_processes_state gauge
node_processes_state
{state="D"} 1
node_processes_state
{state="R"} 2
node_processes_state
{state="S"} 2498


You'll find some documentation for this at https://github.com/prometheus/node_exporter

If you haven't dealt with the concept of exporters yet, you should read https://prometheus.io/docs/instrumenting/exporters/

Cheers,
Cameron
Reply all
Reply to author
Forward
0 new messages