JMX monitor weblogic 总结

weblogic server开放JMX接口,所需就是编写JMX的客户端


关于版本:

weblogic 9.0为分界。

MBean入口——之前:MBeanHome,deprecated;之后:javax.management.MBeanServerConnection 


大概步骤:

weblogic 管理服务器上维护了oracle提供的3个MBeanServer和JDK提供的可选择的platform MBean server。


This MBean serverCreates, registers, and provides access to...

Domain Runtime MBean Server

MBeans for domain-wide services. This MBean server also acts as a single point of access for MBeans that reside on Managed Servers. You can register your own (custom) MBeans in this MBean server (see "Registering Custom MBeans in the Domain Runtime MBean Server" in Developing Manageable Applications With JMX for Oracle WebLogic Server).

If your JMX client accesses WebLogic Server MBeans in this MBean server by constructing object names, the client must add a Location=servername key property to the MBean object name. See WebLogic Server MBean Object Names.

Only the Administration Server hosts an instance of this MBean server.

Runtime MBean Server

MBeans that expose monitoring, run-time control, and the active configuration of a specific WebLogic Server instance. You can also register your own (custom) MBeans in this MBean server (see "Registering Custom MBeans in the Domain Runtime MBean Server" in Developing Manageable Applications With JMX for Oracle WebLogic Server).

In this release, the WebLogic Server Runtime MBean Server is configured by default to be the platform MBean server. However, you can configure WebLogic Server to create a separate MBean Server and use it instead of the platform MBean Server. See Using the Platform MBean Server.

Each server in the domain hosts an instance of this MBean server.

Edit MBean Server

Pending configuration MBeans and operations that control the configuration of a WebLogic Server domain. It exposes a ConfigurationManagerMBean for locking, saving, and activating changes.

Only the Administration Server hosts an instance of this MBean server.

The JVM's platform MBean server

MBeans provided by the JDK that contain monitoring information for the JVM itself. You can register custom MBeans in this MBean server.

In this release, WebLogic Server uses the JVM's platform MBean server to contain the WebLogic run-time MBeans by default. As such, the platform MBean server provides access to platform MXBeans, WebLogic run-time MBeans, and WebLogic configuration MBeans that are on a single server instance. See Using the Platform MBean Server, and "Registering MBeans in the JVM Platform MBean Server" in Developing Manageable Applications With JMX for Oracle WebLogic Server.


1. 连接到某MBeanServer

2. 获取connection

3. 通过connection.getAttribute(ObjectName, String)方法逐层获取


注意点:

JMXServiceURL指定协议时,除iiop协议为jdk自带实现,其余协议(t3/http/t3s/https/iiops)需要导入wljmxclient.jar。

并指定connect 的environment变量中协议实现包位置,否则报错unsupported propocol

env.put("jmx.remote.protocol.provider.pkgs" ,"weblogic.management.remote");

connector=JMXConnectorFactory.newJMXConnector(serviceUrl, env);
 connector.connect(env);


资料总结:

Accessing WebLogic Server MBeans with JMX(9.0):http://docs.oracle.com/cd/E13222_01/wls/docs90/jmx/accessWLS.html#1112969

Understanding WebLogic Server MBeans(9.0):http://docs.oracle.com/cd/E13222_01/wls/docs90/jmx/understandWLS.html

使用 JMX 访问 WebLogic Server MBean(9.2):http://edocs.weblogicfans.net/wls/docs92/jmx/accessWLS.html

了解 WebLogic Server MBean(9.2):http://edocs.weblogicfans.net/wls/docs92/jmx/understandWLS.html#wp1127815

Understanding WebLogic Server MBeans(11g):http://docs.oracle.com/cd/E23943_01/web.1111/e13728/understandwls.htm#JMXCU113

weblogic server MBean reference:http://docs.oracle.com/cd/E13222_01/wls/docs90/wlsmbeanref/core/index.html(具体MBean层次结构)





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值