Closed jhsubscribe closed 8 years ago
I'm just writing a pull request for this....
1) Version comparison http://stackoverflow.com/questions/2051229/how-to-compare-versions-in-ruby
The Gem::Version.new('x.y.z') method for comparing the current version to 3.0.0 seems the cleanest so I've used this but depends on Ruby 2 and above. Let me know if you want me to change this to something 1.x compatible.
2) Changlog The latest released version is 0.0.4 but the changelog has entries under 0.0.5 and 0.0.6 and the version.rb in libraries seems to reference 0.0.6?. I've put mine under "unreleased" for now, let me know if that's incorrect?
FYI, I've asked Mongo support about this and they directed me to .. https://jira.mongodb.org/browse/SERVER-16378
Basically they recommend monitoring page_faults instead of index counters so we should probably add this in to the reported stats?
Yes, sounds good, can you change your PR?
I'll roll up all changes into one release.
I was just about to add it and noticed it was already there... server_metrics['mem.pageFaults'] = server_status['extra_info']['page_faults']
metrics-mongodb.rb will need a version check added to stop it erroring on mongo 3
http://docs.mongodb.org/manual/reference/command/serverStatus/ Changed in version 3.0: The server status output no longer includes the workingSet, indexCounters, and recordStats sections.
Removing the 9 row "if" section which references indexCounters causes it to work on Mongo 3 so I suspect the quickest fix would be to wrap this in a "if serverStatus.version != 3" ?