sensu-plugins / sensu-plugins-java

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

Syntax error #3

Closed Mykolaichenko closed 8 years ago

Mykolaichenko commented 8 years ago

Hi! I have some troubles. Its very easy to reproduce.

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04 LTS
Release:    14.04
Codename:   trusty
bash --version
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
ruby --version
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

gem install sensu-plugins-java

gem list | grep java
sensu-plugins-java (0.0.3)
metrics-java-heap-graphite.sh
/usr/local/bin/metrics-java-heap-graphite.sh:23:in `load': /var/lib/gems/1.9.1/gems/sensu-plugins-java-0.0.3/bin/metrics-java-heap-graphite.sh:13: syntax error, unexpected tCONSTANT, expecting keyword_do_cond or ';' or '\n' (SyntaxError)
while getopts 's:n:h' OPT; do
                         ^
/var/lib/gems/1.9.1/gems/sensu-plugins-java-0.0.3/bin/metrics-java-heap-graphite.sh:13: syntax error, unexpected keyword_do_cond, expecting $end
    from /usr/local/bin/metrics-java-heap-graphite.sh:23:in `<main>'
java-heap-pcnt.sh
/usr/local/bin/java-heap-pcnt.sh:23:in `load': /var/lib/gems/1.9.1/gems/sensu-plugins-java-0.0.3/bin/java-heap-pcnt.sh:15: syntax error, unexpected tCONSTANT, expecting keyword_do_cond or ';' or '\n' (SyntaxError)
while getopts 'w:c:n:hp' OPT; do
                            ^
/var/lib/gems/1.9.1/gems/sensu-plugins-java-0.0.3/bin/java-heap-pcnt.sh:15: syntax error, unexpected keyword_do_cond, expecting $end
    from /usr/local/bin/java-heap-pcnt.sh:23:in `<main>'

If anyone have the same problem and successfully resolved it - please, provide solution! Thanks a lot.

eheydrick commented 8 years ago

0.0.4 has been released with ruby binstubs for the non-ruby scripts. Use check-java-heap-pcnt.rb in your check. See the README for more details.