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

Hardcoded threshold values in check-ram.rb override command line values #46

Closed jaykumar-jnpr closed 8 years ago

jaykumar-jnpr commented 8 years ago

Following line override warning and critical threshold set when using "-u" or "--used" memory values.

L88 config[:warn] = 90 L89 config[:crit] = 95

If the current memory usage is at 91% and threshold as set as follows, it will not alert as threshold set on command line are overridden by above two lines

/opt/sensu/embedded/bin/ruby check-ram.rb --used -w 80 -c 90

Expected behaviour:

CheckRAM CRITICAL: 91% RAM used

Actual

CheckRAM WARNING: 91% RAM used