Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


NFS Stats
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
pheezy
Cacti User


Joined: 26 Oct 2006
Posts: 54

PostPosted: Mon Dec 10, 2007 5:28 pm    Post subject: NFS Stats Reply with quote

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.

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:
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!



nfs_client.png
 Description:
Super fancy.
 Filesize:  95.91 KB
 Viewed:  9039 Time(s)

nfs_client.png



cacti_graph_template_ucdnet_-_nfs_client.xml
 Description:
Import this. This template was exported from a 0.8.7a cacti installation.

Download
 Filename:  cacti_graph_template_ucdnet_-_nfs_client.xml
 Filesize:  129.05 KB
 Downloaded:  463 Time(s)


nfs_client.sh
 Description:
Place this in /usr/local/bin/ and make sure it is executable.

Download
 Filename:  nfs_client.sh
 Filesize:  363 Bytes
 Downloaded:  468 Time(s)



Last edited by pheezy on Tue Dec 18, 2007 4:32 pm; edited 1 time in total
Back to top
benr



Joined: 14 Dec 2007
Posts: 1

PostPosted: Fri Dec 14, 2007 8:27 pm    Post subject: Reply with quote

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.



nfs_client_solaris.sh
 Description:
Solaris Version of Pheezy's 'nfs_client.sh'

Download
 Filename:  nfs_client_solaris.sh
 Filesize:  388 Bytes
 Downloaded:  177 Time(s)

Back to top
pheezy
Cacti User


Joined: 26 Oct 2006
Posts: 54

PostPosted: Tue Dec 18, 2007 4:36 pm    Post subject: NFS Server Stats Reply with quote

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.

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

Code:

exec .1.3.6.1.4.1.2021.67 nfs_server /bin/sh /usr/local/bin/nfs_server.sh



nfs_server.png
 Description:
phancy
 Filesize:  56.11 KB
 Viewed:  8494 Time(s)

nfs_server.png



nfs_server.sh
 Description:
Place this on your NFS server, should work fine for most Linux based appliances as well (FalconStor, etc)

Download
 Filename:  nfs_server.sh
 Filesize:  338 Bytes
 Downloaded:  342 Time(s)


cacti_graph_template_ucdnet_-_nfs_server.xml
 Description:
Exported with 0.8.7a

Download
 Filename:  cacti_graph_template_ucdnet_-_nfs_server.xml
 Filesize:  140.62 KB
 Downloaded:  337 Time(s)

Back to top
aboling



Joined: 09 Nov 2007
Posts: 8

PostPosted: Wed Jan 16, 2008 5:57 pm    Post subject: Reply with quote

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.



cacti_graph_template_ucdnetextend__nfs_client_186.xml
 Description:
NFS client template supporting net-snmp "extend" instead of "exec"

Download
 Filename:  cacti_graph_template_ucdnetextend__nfs_client_186.xml
 Filesize:  121.21 KB
 Downloaded:  169 Time(s)

Back to top
dmatton



Joined: 31 Jan 2008
Posts: 2

PostPosted: Thu Jan 31, 2008 10:14 am    Post subject: Problem to configure Reply with quote

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
Back to top
lanyao



Joined: 14 Dec 2005
Posts: 8

PostPosted: Fri Feb 01, 2008 2:03 am    Post subject: Reply with quote

Hi Pheezy,
Very useful template, thank you very much
Back to top
dmatton



Joined: 31 Jan 2008
Posts: 2

PostPosted: Fri Feb 01, 2008 3:36 am    Post subject: Reply with quote

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.
Back to top
brendonc



Joined: 28 Jan 2008
Posts: 7

PostPosted: Mon Feb 04, 2008 11:44 am    Post subject: Reply with quote

This works great. Thanks!

PS -- I had to adjust my graph width to 600 on both client and server stats.
Back to top
buelent



Joined: 30 Jan 2008
Posts: 3

PostPosted: Wed Feb 06, 2008 7:35 am    Post subject: Reply with quote

[Solved]
Back to top
boondocks



Joined: 07 Feb 2008
Posts: 1

PostPosted: Thu Feb 07, 2008 8:31 pm    Post subject: Error: XML parse error on cacti Reply with quote

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
Back to top
buelent



Joined: 30 Jan 2008
Posts: 3

PostPosted: Fri Feb 08, 2008 3:03 am    Post subject: Reply with quote

I had the same problem with 0.8.7 and import works after update to 0.8.7a.
Back to top
bonehead



Joined: 11 Mar 2008
Posts: 2

PostPosted: Tue Mar 11, 2008 4:27 am    Post subject: Reply with quote

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!
Back to top
pheezy
Cacti User


Joined: 26 Oct 2006
Posts: 54

PostPosted: Tue Mar 11, 2008 10:38 am    Post subject: Reply with quote

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!


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.



cacti_graph_template_ucdnet_-_nfs_server.xml
 Description:

Download
 Filename:  cacti_graph_template_ucdnet_-_nfs_server.xml
 Filesize:  140.62 KB
 Downloaded:  225 Time(s)


cacti_graph_template_ucdnet_-_nfs_client.xml
 Description:

Download
 Filename:  cacti_graph_template_ucdnet_-_nfs_client.xml
 Filesize:  129.05 KB
 Downloaded:  172 Time(s)

Back to top
bonehead



Joined: 11 Mar 2008
Posts: 2

PostPosted: Wed Mar 12, 2008 4:53 am    Post subject: Reply with quote

Works great! (i'm the happiest man on this planet ^^)
Thanks for the help !
Back to top
Threepwood



Joined: 22 Apr 2008
Posts: 6

PostPosted: Fri Apr 25, 2008 10:49 am    Post subject: Error when importing template. Reply with quote

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group