I think the issue is actually the way args are being passed. "args=" should not be needed, only the -q and then the full arg list wrapped in quotes. I would suggest opening up the web interface for NCPA:
Code: Select all
http://yourXIaddress:5693Code: Select all
http://yourXIaddress:5693Code: Select all
Active Check Example
Running the following active check from the command line:
./check_ncpa.py -H <our_NCPA_hostname> -t '<your token>' -M 'plugins/check_jmx' -q 'args=-U service:jmx:rmi:///jndi/rmi://<our_IP_address>:1099/jmxrmi -O org.apache.activemq.artemis:broker=\"<our_artemis_instance>\",component=addresses,address=\"event.hub.load.error.test\" -A AddressSize -vvvv -w 300 -c 400'
Would result in the following output:
JMX CRITICAL - AddressSize=96838 | AddressSize=96838
Code: Select all
JMX UNKNOWN Required options not specified Usage: check_jmx -help
Code: Select all
-q 'args=-U service:jmx:rmi:///jndi/rmi://<our_IP_address>:1099/jmxrmi,args=-O org.apache.activemq.artemis:broker=\"<our_artemis_instance>\",component=addresses,address=\"event.hub.load.error.test\",args=-A AddressSize,args=-vvvv,args=-w 300,args=-c 400'
Code: Select all
JMX CRITICAL - No such attribute: AddressSize connecting to org.apache.activemq.artemis:broker="<our_artemis_instance" by URL service:jmx:rmi:///jndi/rmi://<our_ip_address>:1099/jmxrmijavax.management.AttributeNotFoundException: No such attribute: AddressSize
Code: Select all
.... -q 'args=-U service:jmx:rmi:///jndi/rmi://<our_IP_address>:1099/jmxrmi -O org.apache.activemq.artemis:broker=\"<name_of_our_broker>\",component=addresses,address=\"event.hub.load.error.test\" -A AddressSize -vvvv -w 300 -c 400'
Code: Select all
2024-06-2817:03:01,447geventwebsocket.handlerINFO::ffff:<nagios_XI_server_IP>--[2024-06-2817:03:01]"GET/api/plugins/check_jmx/?token=********&check=1&args=-U+service:jmx:rmi:///jndi/rmi://<our_IP_address>:1099/jmxrmi+-O+org.apache.activemq.artemis:broker=\"<name_of_our_broker>\"&component=addresses&address=\"event.hub.load.error.test\"+-A+AddressSize+-vvvv+-w+300+-c+400HTTP/1.1"2006070.083672
Code: Select all
JMX UNKNOWN Required options not specified Usage: check_jmx -help