sensu-plugins / sensu-plugins-java

Sensu Java Plugins
http://sensu-plugins.io
MIT License
5 stars 25 forks source link

fixes issue #11: JVM Used Heap Calculation #18

Closed rideallday closed 7 years ago

rideallday commented 7 years ago

Fixes issue #11

poiriermike commented 7 years ago

Can confirm this calculation will resolve the issue.

majormoses commented 7 years ago

does this differ based on the version of jstat? I see a java 7 example that matches the previous here: https://gist.github.com/nicokruger/3415941

majormoses commented 7 years ago

yup this looks like its version specific: https://docs.oracle.com/javase/7/docs/technotes/tools/share/jstat.html https://docs.oracle.com/javase/8/docs/technotes/tools/unix/jstat.html

The columns are very different which is very brittle...as Java 7 is EOL I am not sure how much I care but this needs to be called out as a breaking change in the CHANGELOG and will be a major release.

majormoses commented 7 years ago

also in order to close out #11 we need the same change in java-heap-graphite.sh based on the comments would you be willing to do that as well?

majormoses commented 7 years ago

@rideallday Thanks for taking the time to research this.

This looks ok eyeballing this (just update changelog to reflect how this has morphed), I will pull this down tomorrow (sorry have a splitting headache) and do some quick testing. Assuming I do not see any issues and what was requested has been updated I will release this tomorrow.

majormoses commented 7 years ago

Sorry for the delay been super busy. It looks sane so far and I do not want to delay this any further so I will merge and release this assuming the testing from @rideallday @poiriermike are sufficient.

majormoses commented 7 years ago

released: https://rubygems.org/gems/sensu-plugins-java/versions/0.0.6