jmx connection working from command line but not svc check
jmx connection working from command line but not svc check
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.
Re: jmx connection working from command line but not svc che
That's pretty hard to read.
Please send me a copy of your profile, you can download it from Admin > System Profile > Download Profile.
If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:
Then send me the resulting /usr/local/nagiosxi/var/components/profile.zip file.
If the profile script fails, please include the ENTIRE output.
Please send me a copy of your profile, you can download it from Admin > System Profile > Download Profile.
If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:
Code: Select all
rm -rf /usr/local/nagiosxi/var/components/profile*
/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh SUPPORTIf the profile script fails, please include the ENTIRE output.
Re: jmx connection working from command line but not svc che
See my previous post but could this be related?
Code: Select all
https://github.com/jiaqi/jmxterm/issues/40#issuecomment-506331408Re: jmx connection working from command line but not svc che
PM'd profile.zip
Re: jmx connection working from command line but not svc che
Please edit your services and change your $ARG4$ from this:
To this:
- Save, Apply Config, let us know the results.
Code: Select all
/usr/lib/nagios/libexec/jboss-cli-client.jarCode: Select all
/usr/local/nagios/libexec/jboss-cli-client.jarRe: jmx connection working from command line but not svc che
Additionally, (see previous message) your password could be what's causing the issue.
Please do this:
Add this to the bottom of /usr/local/nagios/etc/resource.cfg:
Then edit your services and change the password from this:
To this:
Then, save, apply configuration, and force a check to make sure it's working properly now.
Please do this:
Add this to the bottom of /usr/local/nagios/etc/resource.cfg:
Code: Select all
$USER9$=yoUR!p@sswordCode: Select all
-p 'password'Code: Select all
-p '$USER9$'Re: jmx connection working from command line but not svc che
Thank you! The incorrect path was the issue. I really appreciate the help.
Re: jmx connection working from command line but not svc che
That's great to hear! Are we okay to lock the topic and mark it as resolved?
Re: jmx connection working from command line but not svc che
Yes, please close. Thanks again.