JMX plugin - issue

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

JMX plugin - issue

Postby dabrowsk » Tue Aug 24, 2021 2:50 am

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!
dabrowsk
 
Posts: 2
Joined: Thu Oct 10, 2019 4:30 am

Re: JMX plugin - issue

Postby mcapra » Tue Aug 24, 2021 11:05 am

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/
User avatar
mcapra
 
Posts: 3711
Joined: Thu May 05, 2016 3:54 pm

Re: JMX plugin - issue

Postby dabrowsk » Wed Aug 25, 2021 2:03 am

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)
dabrowsk
 
Posts: 2
Joined: Thu Oct 10, 2019 4:30 am

Re: JMX plugin - issue

Postby mcapra » Wed Aug 25, 2021 11:28 am

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/
User avatar
mcapra
 
Posts: 3711
Joined: Thu May 05, 2016 3:54 pm


Return to Community Support

Who is online

Users browsing this forum: No registered users and 27 guests