NFS Stats

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

pheezy
Cacti User
Posts: 61
Joined: Thu Oct 26, 2006 5:30 pm

NFS Stats

Post by pheezy »

I find this graph pretty handy in diagnosing NFS problems and helping to tweak performance. Hope you all like it!

Note that you will just receive NaN's if you don't have NFS installed; of course why do you need this graph if that is the case. :o

Steps to install:

1. Place nfs_client.sh in /usr/local/bin/, make sure it is excecutable. I use puppet to do this, you can use another tool or do it manually.
2. Add a line like this to your snmpd.conf:

Code: Select all

exec .1.3.6.1.4.1.2021.66 nfs_client /bin/sh /usr/local/bin/nfs_client.sh
3. Import the template, and start graphing!
Attachments
nfs_client.sh
Place this in /usr/local/bin/ and make sure it is executable.
(363 Bytes) Downloaded 3344 times
cacti_graph_template_ucdnet_-_nfs_client.xml
Import this. This template was exported from a 0.8.7a cacti installation.
(129.05 KiB) Downloaded 2507 times
Super fancy.
Super fancy.
nfs_client.png (95.91 KiB) Viewed 49895 times
Last edited by pheezy on Tue Dec 18, 2007 4:32 pm, edited 1 time in total.
benr
Posts: 1
Joined: Fri Dec 14, 2007 7:54 pm

Post by benr »

Very kool Pheezy! I liked it so much I wanted it for Solaris so I modified your Linux /proc based polling method to use Solaris Kstats instead.

To use Pheezy's Cacti plugin with Solaris follow his instructions exactly, but use my 'nfs_client_solaris.sh' instead of his 'nfs_client' and you're good to go.

Very handy indeed.

NOTE: This is for NFSv3 only!

Remember, 'snmpd.conf' on Solaris 10/OpenSolaris is found in /etc/sma/snmp/. Once you've added the exec line enable or restart SMA (ie: Net-SNMP) (ex: 'svcadm enable sma' or 'svcadm restart sma')

benr.
Attachments
nfs_client_solaris.sh
Solaris Version of Pheezy's 'nfs_client.sh'
(388 Bytes) Downloaded 1027 times
pheezy
Cacti User
Posts: 61
Joined: Thu Oct 26, 2006 5:30 pm

NFS Server Stats

Post by pheezy »

Here's the server portion. It's about 99% the same as the client stats, but you're just querying /proc/net/rpc/nfsd instead. Follow the same instructions as before. :D

I used this line in my SNMPD and my template, you'll need to change it if you want to use something else:

Code: Select all

exec .1.3.6.1.4.1.2021.67 nfs_server /bin/sh /usr/local/bin/nfs_server.sh
Attachments
phancy
phancy
nfs_server.png (56.11 KiB) Viewed 49350 times
cacti_graph_template_ucdnet_-_nfs_server.xml
Exported with 0.8.7a
(140.62 KiB) Downloaded 1883 times
nfs_server.sh
Place this on your NFS server, should work fine for most Linux based appliances as well (FalconStor, etc)
(338 Bytes) Downloaded 2328 times
aboling
Posts: 8
Joined: Fri Nov 09, 2007 7:52 pm

Post by aboling »

This is a modified client template that works with the "extend" directive of net-snmp instead of "exec". exec has been deprecated and will no longer work in the most recent versions, but extend exposes the data in a different format.

Long story short, this is the same client xml file at the top of the thread with the following search and replace performed on it:

.66.101.
to
.66.4.1.2.10.110.102.115.95.99.108.105.101.110.116.


This was a quick hack and it Works On My Machine<tm> - your mileage may vary.
Attachments
cacti_graph_template_ucdnetextend__nfs_client_186.xml
NFS client template supporting net-snmp &quot;extend&quot; instead of &quot;exec&quot;
(121.21 KiB) Downloaded 1574 times
dmatton
Posts: 2
Joined: Thu Jan 31, 2008 10:12 am

Problem to configure

Post by dmatton »

Hi everybody,

I'm trying to install this template, but I don't know how I can do this.

I have a Cacti server and I want to try to monitor my NFS server (which it's not the Cacti server).

Does anyone can help me ?

Thank's a lot

Bye
lanyao
Posts: 8
Joined: Wed Dec 14, 2005 9:37 pm

Post by lanyao »

Hi Pheezy,
Very useful template, thank you very much :)
dmatton
Posts: 2
Joined: Thu Jan 31, 2008 10:12 am

Post by dmatton »

OK, I've installed the script and the template properly.

When I execute the poller.php script, I've got a timeout.

I increase the execution time in the Cacti settings, but the timeout still here.

I don't know why...

-----

Sorry, I haven't no patience. That's working perfectly.
brendonc
Posts: 7
Joined: Mon Jan 28, 2008 6:53 pm

Post by brendonc »

This works great. Thanks!

PS -- I had to adjust my graph width to 600 on both client and server stats.
buelent
Posts: 3
Joined: Wed Jan 30, 2008 9:42 am

Post by buelent »

[Solved]
boondocks
Posts: 1
Joined: Thu Feb 07, 2008 8:23 pm

Error: XML parse error on cacti

Post by boondocks »

Hi pheezy,

I received a "XML parse error" when I try to import the XML file.

I'm using version 0.8.6i of cacti.

I appreciate any inputs regarding this problem
buelent
Posts: 3
Joined: Wed Jan 30, 2008 9:42 am

Post by buelent »

I had the same problem with 0.8.7 and import works after update to 0.8.7a.
bonehead
Posts: 2
Joined: Tue Mar 11, 2008 4:12 am

Post by bonehead »

Hi! I have a Problem with this Template. If I try to import the XML, the site reloads without any response. I searched two days and try many "solutions" without success. Can anybody help me ? I use Cacti v0.8.7b.

I know: bad english. Reason: I'm a idiot! :cry:
pheezy
Cacti User
Posts: 61
Joined: Thu Oct 26, 2006 5:30 pm

Post by pheezy »

bonehead wrote:Hi! I have a Problem with this Template. If I try to import the XML, the site reloads without any response. I searched two days and try many "solutions" without success. Can anybody help me ? I use Cacti v0.8.7b.

I know: bad english. Reason: I'm a idiot! :cry:
These were exported with cacti 0.8.7a, and I do recall some database changes with 0.8.7b.

I've exported the attached files from a 0.8.7b installation, you might want to try them, though YMMV.
Attachments
cacti_graph_template_ucdnet_-_nfs_client.xml
(129.05 KiB) Downloaded 1508 times
cacti_graph_template_ucdnet_-_nfs_server.xml
(140.62 KiB) Downloaded 1650 times
bonehead
Posts: 2
Joined: Tue Mar 11, 2008 4:12 am

Post by bonehead »

Works great! (i'm the happiest man on this planet ^^)
Thanks for the help !
Threepwood
Posts: 7
Joined: Tue Apr 22, 2008 3:52 pm

Error when importing template.

Post by Threepwood »

I'm getting the following error when I try to import the template :

Error: XML: Hash version does not exist.

Do I need to upgrade my CACTI ?. I'm using version : 0.8.6j

Thanks,
Lucas.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests