I`m using nagios v.3 and trying to monitor the threads of a jboss 4.0.2 server. For this I am using the jboss2nagios plugin. I have installed it correctly according to the official site.

When I test it in the console I have a valid result
# ./check_mbean_collector
check_mbean_collector -H host[,host,..] -p port -m mbean-name -a attribute-name -w warning-level -c critical-level
check_mbean_collector [-h | --help]
check_mbean_collector [-V | --version]
# ./check_mbean_collector -H link.com -p 5566 -m jboss.system:type=ServerInfo -a ActiveThreadCount -w 200 -c 400
ACTIVETHREADCOUNT OK - JMX attribute ActiveThreadCount has value 52|jboss.system:type_ServerInfo:ActiveThreadCount= 52

However, after I add it to nagios, the response comes out as (null)

Here are my config files in nagios:
define command {
command_name check_mbean_collector
command_line $USER1$/check_mbean_collector -H $HOSTADDRESS$ $ARG1$


#define service{
use my-service
host_name url.com
service_description JBOSS THREADS
check_command check_mbean_collector!-p 5566 -m jboss.system:type=ServerInfo -a ActiveThreadCount -w 200 -c 400

As I said the command works from the shell, just not from nagios.
Any ideas of what could be the issue?