Page 1 of 1

jmx connection working from command line but not svc check

Posted: Thu Jul 18, 2019 11:50 am
by proxibid
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.

Re: jmx connection working from command line but not svc che

Posted: Thu Jul 18, 2019 4:13 pm
by ssax
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:

Code: Select all

rm -rf /usr/local/nagiosxi/var/components/profile*​​
/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh SUPPORT
Then send me the resulting /usr/local/nagiosxi/var/components/profile.zip​ file.​

If the profile script fails, please include the ENTIRE output.

Re: jmx connection working from command line but not svc che

Posted: Thu Jul 18, 2019 4:15 pm
by ssax
See my previous post but could this be related?

Code: Select all

https://github.com/jiaqi/jmxterm/issues/40#issuecomment-506331408

Re: jmx connection working from command line but not svc che

Posted: Fri Jul 19, 2019 12:54 pm
by proxibid
PM'd profile.zip

Re: jmx connection working from command line but not svc che

Posted: Fri Jul 19, 2019 3:45 pm
by ssax
Please edit your services and change your $ARG4$ from this:

Code: Select all

/usr/lib/nagios/libexec/jboss-cli-client.jar
To this:

Code: Select all

/usr/local/nagios/libexec/jboss-cli-client.jar
- Save, Apply Config, let us know the results.

Re: jmx connection working from command line but not svc che

Posted: Fri Jul 19, 2019 3:54 pm
by ssax
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:

Code: Select all

$USER9$=yoUR!p@ssword
Then edit your services and change the password from this:

Code: Select all

-p 'password'
To this:

Code: Select all

-p '$USER9$'
Then, save, apply configuration, and force a check to make sure it's working properly now.

Re: jmx connection working from command line but not svc che

Posted: Mon Jul 22, 2019 8:24 am
by proxibid
Thank you! The incorrect path was the issue. I really appreciate the help.

Re: jmx connection working from command line but not svc che

Posted: Mon Jul 22, 2019 1:56 pm
by ssax
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

Posted: Mon Jul 22, 2019 2:04 pm
by proxibid
Yes, please close. Thanks again.