Ok, now we are getting somewhere.
For some reason, Wildfly is refusing the connection. I will have to research on my side what is going on.
Thanks
JBoss check problem
Re: JBoss check problem
Sorry, I had a mistake in the ncpa.cfg entry, here's what worked for mine:
The /usr/local/ncpa/etc/ncpa.cfg entry:
This is what works directly from the wildfly server:
Does that work for you?
Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H 192.168.X.X -t 'XXXXX' -P 5693 -M plugins/check_jvm.jar -q "args=-s service:jmx:remote+http://127.0.0.1:9990,args=-u 'XXXXXX',args=-p 'XXXXXX',args=-t jboss,args=-C 'MemorySimpleHeap,MemoryMetaspace,ProcessCPUUsage,SystemCPUUsage,Uptime',args=-w '17179869184,34359738368,50,70,1500000:',args=-c '32212254720,68719476736,70,90,300000:'"Code: Select all
.jar = java -Djava.class.path=/opt/wildfly/bin/client/jboss-cli-client.jar:$plugin_name GenericASCheck $plugin_argsCode: Select all
su - nagios
cd /usr/local/ncpa/plugins
java -Djava.class.path=/opt/wildfly-19.0.0.Final/bin/client/jboss-cli-client.jar:check_jvm.jar GenericASCheck -s 'service:jmx:remote+http://127.0.0.1:9990' -t jboss -C 'MemorySimpleHeap,MemoryMetaspace,ProcessCPUUsage,SystemCPUUsage,Uptime' -w '17179869184,34359738368,50,70,1500000:' -c '32212254720,68719476736,70,90,300000:'Re: JBoss check problem
Once I changed the nagios user to have permissions to read from our DOMAIN/tmp/auth folder, this method worked.
Thank you!
Thank you!
Re: JBoss check problem
Also, is there a way to monitor the DB connections with this jar? For instance, to alert if the datasource is out of connections?
Re: JBoss check problem
I don't think you can do it with this plugin, here is a list of what the plugin supports, see the check-types section:
Code: Select all
[root@jboss_wildfly plugins]# java -Djava.class.path=/opt/wildfly/bin/client/jboss-cli-client.jar:check_jvm.jar GenericASCheck -h
usage: check_jvm.jar [-c <arg>] [-C <arg>] [-h] [-p <arg>] [-s <arg>] [-t
<arg>] [-u <arg>] [-v] [-w <arg>]
Monitor an application server (Tomcat, JBoss/Wildfly, Jetty, GlassFish)
instance remotely via JMX.
-c,--critical <arg> A list of nagios critical threhsolds. At least
one of this and warning must be entered.
-C,--check-types <arg> A list of the checks that should be run. Valid
checks: Uptime, MemorySimpleNonHeap,
MemorySimpleHeap, MemoryEden, MemorySurvivor,
MemoryOld, MemoryCodeCache,
MemoryCompressedClass, MemoryMetaspace,
ClassCount, ThreadCount, ProcessCPUUsage, and
SystemCPUUsage. Tomcat servers also have the
checks RequestsPerMinute, BytesPerMinute,
BytesPerRequest, ErrorsPerMinute, and
ProcessingTimePerRequest. Note:
RequestsPerMinute, BytesPerMinute,
BytesPerRequest, ErrorsPerMinute, and
ProcessingTimePerRequest also require the name
of the relevant request processor. For example,
"RequestsPerMinute:http-nio-0.0.0.0-8080". For
rate-based checks, a negative value may be
returned after a counter is reset.
-h,--help Print this message and exit.
-p,--password <arg> A password to pass to the JMX connection (should
be used in conjunction with the username option
-s,--service-url <arg> The full JMX service URL of your JVM (defaults
to localhost). This will be similar to
'service:jmx:rmi:///jndi/rmi://<host>:<port>/jmx
rmi'
-t,--server-type <arg> The name of the server brand you're using.
Should be one of {tomcat, jboss, jetty,
glassfish, other}. Defaults to 'other'. Wildfly
users may use 'jboss'.
-u,--username <arg> A username to pass to the JMX connection (should
be used in conjunction with the password option
-v,--version Print the version information and exit.
-w,--warning <arg> A list of nagios warning thresholds. At least
one of this and critical must be entered.Re: JBoss check problem
Thank you. That is all I needed.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: JBoss check problem
Great!hbouma wrote:Thank you. That is all I needed.
Locking thread