JMX plugin - issue

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
dabrowsk
Posts: 2
Joined: Thu Oct 10, 2019 4:30 am

JMX plugin - issue

Post by dabrowsk »

Hello Nagios team!

We have Teamcenter system which use Visualization MBean metrics. We would like to monitor following attribute rules as attached.

We have installed JMX plugin:
https://exchange.nagios.org/directory/P ... mx/details

We can pull data from HeapMemoryUsage attribute:
[root@ch00sa402 plugin]# ./check_jmx -U service:jmx:rmi:///jndi/rmi://ch00sa120:1099/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -vvvv -w 1000000
JMX OK HeapMemoryUsage.used=75580216{committed=514850816;init=536870912;max=514850816;used=75580216} | committed=514850816; init=536870912; max=514850816; used=75580216;

But when we try to pull data from attribute VisServerManager872 we get this:

[root@ch00sa402 plugin]# ./check_jmx -U service:jmx:rmi:///jndi/rmi://ch00sa120:1099/jmxrmi -O java.lang:type=VisServerManager872 -A NumberofAssignedServers
JMX CRITICAL java.lang:type=VisServerManager872 | JMX CRITICAL java.lang:type=VisServerManager872

Question is it syntax error or simply this attribute is not supported?

Thank you in advance!
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: JMX plugin - issue

Post by mcapra »

Tough to provide much insight without a detailed understanding of the VisServerManager872 object structure.

This plugin does have a -v argument which should provide you with better debugging output:

Code: Select all

-v[vvv]
	verbatim level controlled as a number of v (optional)
Might try -vvvv and see if it provides any clues.
Former Nagios employee
https://www.mcapra.com/
dabrowsk
Posts: 2
Joined: Thu Oct 10, 2019 4:30 am

Re: JMX plugin - issue

Post by dabrowsk »

Hello,

This is what I get after invoking:

Code: Select all

./check_jmx -U service:jmx:rmi:///jndi/rmi://ch00sa120:1099/jmxrmi -O java.lang:type=VisServerManager872 -A NumberofAssignedServers -I NumberofAssignedServers -vvv

Code: Select all

JMX CRITICAL java.lang:type=VisServerManager872 connecting to java.lang:type=VisServerManager872 by URL service:jmx:rmi:///jndi/rmi://ch00sa120:1099/jmxrmijavax.management.InstanceNotFoundException: java.lang:type=VisServerManager872 at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(Unknown Source) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.access$300(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.getAttribute(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Unknown Source) at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:303) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:279) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:164) at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown Source) at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:903) at org.nagios.JMXQuery.execute(JMXQuery.java:184) at org.nagios.JMXQuery.main(JMXQuery.java:76) | JMX CRITICAL java.lang:type=VisServerManager872 connecting to java.lang:type=VisServerManager872 by URL service:jmx:rmi:///jndi/rmi://ch00sa120:1099/jmxrmijavax.management.InstanceNotFoundException: java.lang:type=VisServerManager872 at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(Unknown Source) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.access$300(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.getAttribute(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Unknown Source) at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:303) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:279) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:164) at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown Source) at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:903) at org.nagios.JMXQuery.execute(JMXQuery.java:184) at org.nagios.JMXQuery.main(JMXQuery.java:76)
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: JMX plugin - issue

Post by mcapra »

Simply put:
https://docs.oracle.com/javase/7/docs/a ... ption.html
The specified MBean does not exist in the repository.
You're asking for an MBean VisServerManager872 that doesn't exist in the repository located at service:jmx:rmi:///jndi/rmi://ch00sa120:1099/jmxrmi. Why it doesn't exist in the same repository as the more standard MBeans (like Memory used in your successful example), I cannot say as I am not familiar with Teamcenter administration.
Former Nagios employee
https://www.mcapra.com/
Locked