-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NFS data not displaying #6
Comments
so that led me to thinking more today.. The reason this doesn't work on this particular server is that it is using nfs v4.. which doesn't use readdirplus..
after making a test and editing /etc/nfsmount.conf and adding which will make it default my test mount was now forced to v3 and now i have readdirplus
|
My suggestions would definitely be some kind of detection of v3 vs v4 nfs mounts and just dont fail 'hard' when it is nfsv4 .. or just making the self.nfs_ops more dynamic |
So, we need to try to iterate over the set of available stats instead of trying to force a list (as I have done). It may require some "browsing" of the nfsiostat code to see "how they handle it" ... if you want to take it on, feel free. We are working through some "other" issues at the moment, but I welcome improvement. We will be moving to NFSv4 soon, once the new filer is in place, as long as performance is reasonable. :) ... then this will become priority for me too. Alternatively maybe we can use a "with" or "if op_stat" to get around the "None" issue as a temporary fix? ~tommy |
Pulled in your changes temporarily to remove ReadDirPlus. As noted above, I would like to "detect" its presence somehow, but for now this makes it better. #9 |
This adds ReadDirPlus back in for NFSv3 mounts, but has an exception similar to the code used in nfsiostat. I had to expose another method in nfsiostat.py has_readdirplus() since that was internal only data before. ~tommy
Issue #6 - ReadDirPlus doesn't work on NFSv4 mounts
Hi! Sorry for my comment. Im new to this plugin, I know this is closed but, I have installed version 2.4 and also tried version 2.5 on centos 6.6 but still no data appears on the graph in the new relic plugins tab. Can you please advise? Many Thanks! |
I also got this error. ERROR newrelicnfs.plugin:_get_nfs_stat_for: 'NoneType' object is unsubscriptable Thanks in advance! |
jsdizon what version of NFS do you have? try forcing v3 see if you get the error and v4 etc |
Thanks for approaching nukepuppy! Im using v4, I'll try to force it to v3. Thanks! |
Hi nukepuppy! Thanks! It works! Im just curious on the v4? why it does not show any data? Many Thanks!!! 👍 |
@jsdizon it would seem if you check cat /proc/self/mountstats when you mount in nfs v4 vs nfsv3 you will see that there is values that nfs v4 has that nfs v3 doesn't and vice versa... since the code right statically wants to push certain stats up - if it finds one it doesn't know about you get the error NoneType... basically saying this unknown value can't be scripted. This is where in future it needs to be improved to 'scan' the values and then populate the charts based on what it found (instead of a static set of values which are nfs v3 specific) hope it helps |
For what its worth, we are forced to NFSv3 (for historical reasons), but we have had a patch (https://github.com/LarkIT/newrelic-nfsiostat/blob/master/src/plugin.py#L184-L187) that makes NFSv4 work. I am not sure why it would be missing operations / sec, unless it was like in the process of unmounting or something? (and I am pretty sure that case is accounted for). Note that the "bulk" of the code comes directly from "nfsiostat" (with very minor modifications). What does your nfsiostat report? (nfsiostat is in the nfs-utils package) |
No worries... this was originally forked from https://github.com/jduncan-rva/newRHELic ... and modified to suit our needs. It probably needs overhauled. I am happy to take pull requests if you guys have any ideas. I think it still fails to start at boot time too, so beware. :) Since your issue is separate from this one (since this one was fixed by @nukepuppy) , I would recommend creating a new issue, and pasting in output from Tommy |
I can't bend my brain in python ways right now, but it "feels like" we need something like
or nil or null or if ! op_stat or something? :) |
While trying to set this up on a centos 6 server (testing purposes before moving to production) I discovered that there was no data being sent to newrelic.
was working on
CentOS release 6.4 (Final)
Linux default-centos-64.vagrantup.com 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Upon discussions in #3 I took the advice and enabled the debug option in the python code
origin error was:
This lead me to believe something was being passed as None to op_stat and therefore erroring out.
After adding some print statements to the code I got this;
Noting that ReadDirPlus op has an op_state of None
To ensure i was on write track i removed the ReadDirPlus value from self.nfs_ops like this https://github.com/nukepuppy/newrelic-nfsiostat/commit/2d99b6b0efc13d6251c7e4b78554ae52a945b136
and this started to report..
here is output of the /proc/self/mountstats
The text was updated successfully, but these errors were encountered: