Monitor NFS mount points with iostat and Munin

20 09 2012

I wrote several plugins to monitor the NFS mount points of a client server.
They use iostat for generate the stats, giving the following information:

– Name of the mount point.

– rBlk_nor/s (rkB_nor/s, rMB_nor) Number of blocks (kilobytes, megabytes) read by applications via the read(2) system call interface.

– wBlk_nor/s (wkB_nor/s, wMB_nor/s) Number of blocks (kilobytes, megabytes) written by applications via the write(2) system call interface.

– rBlk_dir/s (rkB_dir/s, rMB_dir/s) Number of blocks (kilobytes, megabytes) read from files opened with the O_DIRECT flag.

– wBlk_dir/s (wkB_dir/s, wMB_dir/s) Number of blocks (kilobytes, megabytes) written to files opened with the O_DIRECT flag.

– rBlk_svr/s (rkB_svr/s, rMB_svr/s) Number of blocks (kilobytes, megabytes) read from the server by the NFS client via an NFS READ request.

– wBlk_svr/s (wkB_svr/s, wMB_svr/s) Number of blocks (kilobytes, megabytes) written to the server by the NFS client via an NFS WRITE request.

– ops/s Number of operations that were issued to the filesystem per second.

– rops/s – Number of “read” operations that were issued to the filesystem per second.

– wops/s – Number of “write” operations that were issued to the filesystem per second.

Installation:

1.- Download the plugins:
https://github.com/rfrail3/munin-plugins/tree/master/nfs

2.- Put them in the Munin directory, usually “/etc/munin/plugins/”

3.- Configure munin, edit “/etc/munin/plugin-conf.d/munin-node” and add:
[nfs_iostat*]
user root
env.log /var/log/nfs-iostat.log

4.- Install systat for get iostat software:
# apt-get install systat

5.- Download the init.d script and put it in “/etc/init.d”
https://github.com/rfrail3/munin-plugins/tree/master/nfs/init.d

6.- Install and start the new script, a new log file will be created at /var/log/nfs-iostat.log:
# update-rc.d nfs-iostat defaults
/etc/init.d/nfs-iostat start

7.- Download the logrotate conf, for the new log file. Put it in “/etc/init.d/logrotate.d/”
https://github.com/rfrail3/munin-plugins/tree/master/nfs/init.d

8.- Restart Munin and enjoy:
# /etc/init.d/muin-node restart

Examples:

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: