sensu-plugins / sensu-plugins-memory-checks

This plugin provides native memory instrumentation for monitoring and metrics collection, including: memory usage via `free` and `vmstat`, including metrics. Note that this plugin may have cross-platform issues.
http://sensu-plugins.io
MIT License
15 stars 50 forks source link

Different defaults for used ram in `check-ram.rb` #67

Open sekrett opened 7 years ago

sekrett commented 7 years ago

For example it is ok to have 20% of free ram but 40% of used ram is considered critical which is probably wrong.

majormoses commented 7 years ago

Yes this check has sane defaults when you take them as is, when using --used you will want to adjust your thresholds accordingly. I have not reviewed that code in a while so I am not sure how feasible it is to modify the defaults when an option is changed only if if cli opts were not passed in

This is related to a couple issues/prs so I am linking them for context:

If you can propose a solution I am more than happy to review a PR.

sekrett commented 7 years ago

It think it should be the inverse for --used: 90% for warn and 95% for crit. I'll try to do a PR.

majormoses commented 7 years ago

Yup, the trick is to only do that when someone has not changed the defaults which is when I originally did I did not realize and it made it impossible to overwrite. We had to fix it so that it always allowed the user full control. If you can think of some way to do that I am all ears.