Hi,
The problem is:
$ check_jmx4perl --url http://localhost:8081/jolokia --mbean java.lang:type=Threading --operation findDeadlockedThreads --null no-deadlock --string 1 --critical \!no-deadlock --critical 10
UNKNOWN - Error: 400 java.lang.IllegalArgumentException : Invalid number of operation arguments. Operation findDeadlockedThreads on java.lang:type=Threading requires 0 parameters, not 1 as given
The Environment is:
OS:
Linux test1 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
perl:
v5.10.1 (*) built for x86_64-linux-thread-multi
Tomcat:
apache-tomcat-7.0.52
Java:
java version "1.7.0_51"
jolokia:
jolokia-1.2.2
check_jmx4perl:
check_jmx4perl 1.10
And I also find a similar question at https://rt.cpan.org/Public/Bug/Display.html?id=81699 , and https://github.com/rhuss/jmx4perl/issues/21 also talk about it. The difference is version of check_jmx4perl and jolokia.
Best regards,
Guoqin LI
gqlgl2050#sina.com
Thanks for reporting this bug, its fixed for 1.11 (the development version 1.11_2 contains this fix, I just uploaded it to CPAN (might take a bit until available)).
There was also an error in the documentation, --string must not take any argument. The proper call is:
$ check_jmx4perl --url http://localhost:8080/jolokia --mbean java.lang:type=Threading --operation findDeadlockedThreads --null no-deadlock --critical ‘!no-deadlock‘
OK - [java.lang:type=Threading,findDeadlockedThreads] : ‘no-deadlock‘ as expected |[java.lang:type#Threading,findDeadlockedThreads]=no-deadlock;;!no-deadlock
原文地址:https://rt.cpan.org/Ticket/Display.html?id=98166
目前的解决办法是check_jmx4perl 版本回滚到1.0.7,jolokia版本不变。
check_jmx4perl 1.10 findDeadlockedThreads ERROR "Invalid number of operation arguments"