jmx connection working from command line but not svc check
Posted: Thu Jul 18, 2019 11:50 am
Centos 7.6 running XI 5.6.4
Running this from command line on server as root works -
# /usr/bin/java -Djava.class.path=/usr/local/nagios/libexec/jboss-cli-client.jar:/usr/local/nagios/libexec/check_jvm.jar GenericASCheck -s service:jmx:remote+http://server01:9990 -u 'user' -p 'password' -t jboss -C 'MemorySimpleHeap,MemoryMetaspace,ProcessCPUUsage,SystemCPUUsage,Uptime,ThreadCount' -w '17179869184,34359738368,50,70,1500000:,150' -c '32212254720,68719476736,70,90,300000:,190'
CRITICAL: 2 checks returned CRITICAL | jboss_heap=992123672B;17179869184;32212254720;; jboss_metaspace=137781288B;34359738368;68719476736;; jboss_process_cpu_usage=6.518282988871224%;50;70;; jboss_system_cpu_usage=19.032513877874706%;70;90;; jboss_uptime=145210ms;1500000:;300000:;; jboss_threads=241;150;190;;
Heap-Allocated Memory returned OK with 946.16 MiB
Metaspace (non-heap) returned OK with 131.4 MiB
Process CPU usage returned OK with 6.52 %
System CPU usage returned OK with 19.03 %
Uptime returned CRITICAL with 2.42 minutes
Thread Count returned CRITICAL with 241 threads running
However, the service check running the same command -
Command view /usr/bin/java -Djava.class.path=$ARG2$:$USER1$/check_jvm.jar GenericASCheck $ARG1$
$ARG1$ -s service:jmx:remote+http://server01:9990 -u 'user' -p 'password' -t jboss -C 'MemorySimpleHeap,MemoryMetaspace,ProcessCPUUsage,SystemCPUUsage,Uptime,ThreadCount' -w '17179869184,34359738368,50,70,1500000:,150' -c '32212254720,68719476736,70,90,300000:,190'
$ARG2$ /usr/lib/nagios/libexec/jboss-cli-client.jar
gives me "UNKNOWN: Failed to connect: Unsupported protocol: remote+http"
I'm not sure what if going on. Thanks.
Running this from command line on server as root works -
# /usr/bin/java -Djava.class.path=/usr/local/nagios/libexec/jboss-cli-client.jar:/usr/local/nagios/libexec/check_jvm.jar GenericASCheck -s service:jmx:remote+http://server01:9990 -u 'user' -p 'password' -t jboss -C 'MemorySimpleHeap,MemoryMetaspace,ProcessCPUUsage,SystemCPUUsage,Uptime,ThreadCount' -w '17179869184,34359738368,50,70,1500000:,150' -c '32212254720,68719476736,70,90,300000:,190'
CRITICAL: 2 checks returned CRITICAL | jboss_heap=992123672B;17179869184;32212254720;; jboss_metaspace=137781288B;34359738368;68719476736;; jboss_process_cpu_usage=6.518282988871224%;50;70;; jboss_system_cpu_usage=19.032513877874706%;70;90;; jboss_uptime=145210ms;1500000:;300000:;; jboss_threads=241;150;190;;
Heap-Allocated Memory returned OK with 946.16 MiB
Metaspace (non-heap) returned OK with 131.4 MiB
Process CPU usage returned OK with 6.52 %
System CPU usage returned OK with 19.03 %
Uptime returned CRITICAL with 2.42 minutes
Thread Count returned CRITICAL with 241 threads running
However, the service check running the same command -
Command view /usr/bin/java -Djava.class.path=$ARG2$:$USER1$/check_jvm.jar GenericASCheck $ARG1$
$ARG1$ -s service:jmx:remote+http://server01:9990 -u 'user' -p 'password' -t jboss -C 'MemorySimpleHeap,MemoryMetaspace,ProcessCPUUsage,SystemCPUUsage,Uptime,ThreadCount' -w '17179869184,34359738368,50,70,1500000:,150' -c '32212254720,68719476736,70,90,300000:,190'
$ARG2$ /usr/lib/nagios/libexec/jboss-cli-client.jar
gives me "UNKNOWN: Failed to connect: Unsupported protocol: remote+http"
I'm not sure what if going on. Thanks.