jmx connection working from command line but not svc check

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
proxibid
Posts: 30
Joined: Fri Aug 15, 2014 2:19 pm

jmx connection working from command line but not svc check

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post by ssax »

See my previous post but could this be related?

Code: Select all

https://github.com/jiaqi/jmxterm/issues/40#issuecomment-506331408
proxibid
Posts: 30
Joined: Fri Aug 15, 2014 2:19 pm

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

Post by proxibid »

PM'd profile.zip
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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.
proxibid
Posts: 30
Joined: Fri Aug 15, 2014 2:19 pm

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

Post by proxibid »

Thank you! The incorrect path was the issue. I really appreciate the help.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post by ssax »

That's great to hear! Are we okay to lock the topic and mark it as resolved?
proxibid
Posts: 30
Joined: Fri Aug 15, 2014 2:19 pm

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

Post by proxibid »

Yes, please close. Thanks again.
Locked