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

Error while executing script check-memory.rb #63

Closed osho1278 closed 7 years ago

osho1278 commented 7 years ago

I am getting following error will executing [root@localhost bin]# /opt/sensu/embedded/bin/ruby check-memory.rb -w 700 -c 800

/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-memory-checks-3.0.0/bin/check-memory.sh: line 44: [: missing `]'

Its because there is no space on line 44 Instead of [ -z "$WARN"] || [ -z "$CRIT" ]; then it should be if [ -z "$WARN" ] || [ -z "$CRIT" ]; then

majormoses commented 7 years ago

@osho278 thanks for the report, I have a hotfix that just needs to go through CI and a release cut which should be done shortly.

majormoses commented 7 years ago

released: https://rubygems.org/gems/sensu-plugins-memory-checks/versions/3.0.1