监控所有服务器 http(s)://host:port/management/tenant-monitoring/servers
监控指定服务器
http(s)://host:port/management/tenant-monitoring/servers/{servername}
监控服务器所有集群
http(s)://host:port/management/tenant-monitoring/clusters
监控指定集群
http(s)://host:port/management/tenant-monitoring/clusters/{clustername}
监控所有应用
http(s)://host:port/management/tenant-monitoring/applications
监控指定应用
http(s)://host:port/management/tenant-monitoring/applications/{applicationname}
监控所有数据源
http(s)://host:port/management/tenant-monitoring/datasources
监控指定数据源
http(s)://host:port/management/tenant-monitoring/datasources/{datasourcename}
译文
甲骨文®融合中间件
使用甲骨文网络逻辑服务器的恢复性管理服务
11g发布 1 (10.3.6)
E24682-01
2011 年 11 月
注意:
在当前发布的 WebLogic 服务器中,RESTful 管理服务仅支持该方法,因为它们严格限于 WebLogic 服务器监控。GET HTTP
简介和路线图
以下部分描述了本指南的内容和组织-使用与甲骨文WebLogic服务器的RESTful管理服务:
文档范围和受众
WebLogic 服务器提供可在甲骨文公共云管理控制台外监控 WebLogic 服务器的 RESTful 管理服务。本文档描述了如何使用 RESTful 管理服务。
假设读者熟悉 Java EE 和一般应用管理概念。本文件强调采取实际方法,开发一套有限但有用的REST监控服务。
本文档指南
本文件的组织如下:
-
本部分,导言和路线图,描述了本指南的范围和组织。
-
概述,提供使用WebLogic服务器的RESTful管理服务的概述。
-
入门,描述了如何启用 WebLogic 服务器中的 RESTful 管理服务。
-
使用 REST URL 监控 WebLogic 服务器域,描述 HTTP URL 的格式和使用,以及支持的请求内容类型。
-
支持用于监控 WebLogic 服务器的 REST 资源,在使用 RESTful 管理服务监控 WebLogic 服务器时描述支持的 REST 资源。
相关文档
有关开发 WebLogic 服务器应用程序其他类型的管理服务的指南,请参阅以下文档:
-
使用 WebLogic 记录服务进行应用程序日志记录,可描述 WebLogic 对日志消息国际化和本地化的支持,并显示如何使用 WebLogic 服务器提供的模板和工具创建或编辑特定于本地化的消息目录。
-
配置和使用 WebLogic 诊断框架可描述如何配置和使用 WebLogic 诊断框架来创建、收集、分析、存档和访问由运行中的服务器及其容器内部署的应用程序生成的诊断数据。
概述
WebLogic 服务器 RESTful 管理服务提供表示性状态传输 (REST) 资源,使您能够在甲骨文公共云管理控制台之外监控 WebLogic 服务器。REST 客户端可以在灵活定制的控制台中嵌入细粒度监控信息,这些控制台可以在甲骨文公共 PaaS WebLogic 服务的防火墙后面运行时监控域的服务器、集群、应用程序和数据源。监控资源由内部 Web 应用程序托管。
只有属于组或组的用户才能访问 RESTful 管理服务。有关定义 WebLogic 服务器中用户角色的更多信息,请参阅甲骨文 WebLogic 服务器使用角色和策略保护资源中的"用户、组和安全角色"。Administrators
Monitors
您可以通过恢复性管理服务监控什么?
WebLogic 服务器的以下组件可使用 RESTful 管理服务进行监控:
-
服务器–域中或指定服务器实例中的所有服务器实例。
-
集群-域中的所有群集或指定的集群,包括集群的所有服务器成员。
-
应用程序–部署在域或指定应用程序的所有应用程序。
-
数据源–在域或指定数据源中运行的所有数据源。
开始
要在 WebLogic 服务器域中使用 RESTful 管理服务,您的 WebLogic 管理员必须启用 WebLogic 服务器管理控制台。有关更多信息,请参阅"启用 REST 管理服务"在管理控制台在线帮助。
使用 REST URL 监控网络逻辑服务器域
在当前发布的 WebLogic 服务器中,RESTful 管理服务仅支持该方法,因为它们严格限于 WebLogic 服务器监控。每个受监测的 WebLogic 服务器资源都可以通过 HTTP 统一资源定位器 (URL) 访问。GET HTTP
恢复网址格式以监控网络逻辑
Web逻辑服务器监控资源网址的格式是:
http(s)://
host:port
/management/tenant-monitoring/
path
哪里:
host
–网络逻辑服务器运行的主机
port
–HTTP或高频端口
path
–识别单个资源的相对路径。例如,服务器实例的路径是:servers/
myserver
支持"恢复资源请求"中的内容类型
WebLogic 服务器恢复管理服务支持以下表示格式:
-
杰森
-
XML
-
赫特姆
客户应通过 HTTP 标题指定资源表示。例如,如果客户端正在使用 cURL 实用程序,则应通过选项指定类型,具体如下:-H
-
杰森–指定
-H "Accept application/json"
-
XML–指定
-H "Accept application/xml"
-
HTML–省略选项
-H
网络逻辑服务器监控资源的表示方式
有两种类型的 WebLogic 服务器监控资源表示:
项目资源表示
项目资源表示 WebLogic 服务器实体的实例;例如,服务器实例。
杰森格式
以下是使用 JSON 的服务器实例的项目资源表示的示例输出:
{
"body": {
"item": {
// attributes for the item, e.g.
// "name": "adminserver"
// "state": "RUNNING",
// …
}
},
"messages": [
// an array of messages
]
}
可能的属性值类型是:
-
字符串,由双引号"包围"
-
布尔,真假
-
数
-
零
-
阵列,由"["和"]"包围
-
对象,由"{"和"}"包围
XML 格式
以下是使用 XML 的服务器实例的项目资源表示的示例输出:
<?xml version="1.0" encoding="utf-8"?>
<data>
<object>
<property name="body">
<object>
<property name="item">
<object>
<!--
<property name="Name">
<value type="string">adminserver</value>
</property>
// other properties
-->
</object>
</property>
</object>
</property>
<property name="messages">
<array>
<!-- message objects -->
</array>
</property>
</object>
</data>
集合资源表示
集合资源表示同类型 WebLogic 服务器实体集:例如,在域中表示所有服务器时。通常,集合中的每个实体都存在项目资源。
杰森格式
以下是使用 JSON 在域中所有服务器的集合资源表示的示例输出:
{
"body": {
"items": [
{
// attributes for item 1
// "name": "adminserver"
// "state": "RUNNING",
// …
},
{
// attributes for item 2
},
…
{
// attributes for item n
}
],
"messages": [
]
}
XML 格式
以下是使用 XML 在域中所有服务器的集合资源表示的示例输出:
<?xml version="1.0" encoding="utf-8"?>
<data>
<object>
<property name="body">
<object>
<property name="items">
<array>
<!--
<object>
<property name="name">
<value type="string">adminserver</value>
</property>
// other properties
</object>
// other items
-->
</array>
</property>
</object>
</property>
<property name="messages">
<array>
<!--
<object>
<property name="severity">
<value type="string">WARNING</value>
</property>
<property name="message">
<value type="string">Server ms1 is not running.</value>
</property>
</object>
// other messages
-->
</array>
</property>
</object>
</data>
支持用于监控网络逻辑服务器的 REST 资源
本节描述了使用 RESTful 管理服务监控 WebLogic 服务器域时支持的 REST 资源。
用于监控域内所有服务器的休息资源
下面列出的 URL 返回配置在域中的所有服务器,并为每个服务器提供运行时间信息,包括服务器状态和健康状况。/servers
http(s)://
host:port
/management/tenant-monitoring/servers
项目属性 (紧凑格式) | 类型 | 有效值 |
---|---|---|
| 字符串 | 服务器名称。 |
| 字符串 | 服务器状态。可能的状态是:
|
| 字符串 | 服务器健康状况。可能的健康状态是:
|
以下是 JSON 格式的 URL 响应示例:/servers
{
"body": {
"items": [
{
"name": "adminserver",
"state": "RUNNING",
"health": " HEALTH_OK "
},
{
"name": "ms1",
"state": "SHUTDOWN",
"health": ""
}
],
},
"messages": [
]
}
用于在域中监控指定服务器的 REST 资源
下面列出的 URL 返回域中指定服务器的信息,包括服务器状态、健康和 JVM 堆可用性。/servers/{servername}
http(s)://
host:port
/management/tenant-monitoring/servers/{servername}
项目属性 | 类型 | 有效值 |
---|---|---|
| 字符串 | 服务器实例的名称。 |
| 字符串 | 服务器状态。可能的状态是:
|
| 字符串 | 服务器健康状况。可能的健康状态是:
|
| 字符串 | 服务器所属的集群。 |
| 字符串 | 服务器运行的机器。 |
| 字符串 | Web逻辑服务器实例的版本。 |
| 数 | 当前在服务器上注册的插座数。 |
| 数 | JVM堆的当前大小(以字节)。 |
| 数 | JVM 堆中可用的当前内存量(以字节表示)。 |
| 字符串 | 日本合资公司爪哇版。 |
| 字符串 | 合资企业运行的操作系统。 |
| 字符串 | JVM 运行的操作系统的版本。 |
| 数 | VM 在所有处理器上的平均负载。例如,1.0 代表 100%。 |
以下是 JSON 格式的 URL 响应示例:/servers/{servername}
{
"body": {
"item": {
"name": "adminserver",
"clusterName": null,
"state": "RUNNING",
"currentMachine": "machine-0",
"weblogicVersion": "WebLogic Server 12.1.1.0.0 Thu May 5 01:17:16 2011 PDT",
"openSocketsCurrentCount": 2,
"health": "HEALTH_OK",
"heapSizeCurrent": 536870912,
"heapFreeCurrent": 39651944,
"heapSizeMax": 1073741824,
"javaVersion": "1.6.0_20",
"osName": "Linux",
"osVersion": "2.6.18-238.0.0.0.1.el5xen",
"jvmProcessorLoad": 0.25,
}
},
messages: [
]
}
用于监控域内所有集群的休息资源
下面列出的 URL 返回配置在域中的所有集群,并为每个集群和每个集群的成员服务器(包括所有成员服务器的状态和健康状况)提供运行时间信息。/clusters
http(s)://
host:port
/management/tenant-monitoring/clusters
项目属性 (紧凑格式) | 类型 | 有效值 |
---|---|---|
| 字符串 | 集群名称。 |
| 字符串 | 集群成员服务器:
|
以下是 JSON 格式的 URL 响应示例:/clusters
{
"body": {
"items": [
{
"name": "mycluster1",
"servers": [
{
"name": "ms1",
"state": "RUNNING",
"health": "HEALTH_OK"
},
{
"name": "ms2",
"state": "RUNNING",
"health": "HEALTH_OVERLOADED"
}
]
}
],
},
"messages": [
]
}
用于监控域内指定集群的 REST 资源
下面列出的 URL 返回指定集群及其成员服务器的运行时间信息,包括成员服务器的状态和健康状况。/clusters/{clustername}
http(s)://
host:port
/management/tenant-monitoring/clusters/{clustername}
项目属性 | 类型 | 有效值 |
---|---|---|
| 字符串 | 集群名称。 |
| 对象或数字 | 集群成员服务器:
|
以下是 JSON 格式的 URL 响应示例:/cluster
{
"body": {
"item": {
"name": "mycluster1",
"servers": [
{
"name": "ms1",
"state": "RUNNING",
"health": "OK",
"clusterMaster": false,
"dropOutFrequency": "Never"
"resendRequestsCount": 0,
"fragmentsSentCount": 3708,
"fragmentsReceivedCount": 3631
},
{
"name": "ms2",
"state": "RUNNING",
"health": "OK"
...
}
]
}
},
"messages": [
]
}
用于监控部署在域内的所有应用程序的 REST 资源
下面列出的 URL 返回部署在域中的所有应用程序及其运行时间信息,包括应用程序类型及其状态和健康状况。/applications
http(s)://
host:port
/management/tenant-monitoring/applications
项目属性 (紧凑格式) | 类型 | 有效值 |
---|---|---|
| 字符串 | 应用程序的名称。 |
| 字符串 | 应用程序类型。可能的类型是:
|
| 字符串 | 合并应用程序运行状态。可能的状态是:
|
| 字符串 | 应用的合并健康状况。可能的健康状态是:
|
以下是 JSON 格式的 URL 响应示例:/applications
{
"body": {
"items": [
{
"name": "appscopedejbs",
"type": "ear",
"state": "STATE_ACTIVE",
"health": " HEALTH_OK"
},
{
"name": "MyWebApp",
"type": "war",
"state": "STATE_NEW"
}
}
],
},
"messages": [
]
}
用于监控部署在域中的指定应用程序的 REST 资源
URL 返回指定应用程序的运行时间信息,包括实体豆类、应用范围工作经理和数据源的统计数据。/applications/{applicationname}
http(s)://
host:port
/management/tenant-monitoring/applications/{applicationname}
项目属性 | 类型 | 有效值 |
---|---|---|
| 字符串 | 应用程序的名称。 |
| 字符串 | 应用程序类型。可能的类型是:
|
| 字符串 | 合并应用程序运行状态。可能的状态是:
|
| 字符串 | 应用的合并健康状况。可能的健康状态是:
|
| 对象 | 每个目标的应用程序运行状态:
|
| 对象 | 嵌入式数据源的运行时间信息:
|
| 对象或数字 | 为应用程序配置的工作经理的统计数据:
|
| 对象或数字 | 适用于应用程序的最小线程约束的统计:
|
| 对象或数字 | 为应用程序配置的最大线程约束的统计:
|
| 对象或数字 | 为应用程序配置的请求类的统计信息:
|
以下是 JSON 格式的 URL 响应示例:/applications/{applicationname}
{
"body": {
"item": {
"name": "appscopedejbs",
"type": "ear",
"health": " HEALTH_OK ",
"state": "STATE_ACTIVE",
"targetStates": [
{
"target": "ms1",
"state": "STATE_ACTIVE",
},
{
"name": "ms2",
"state": "STATE_ACTIVE",
}
] ,
"dataSources": [
],
"entities": [
],
"workManagers": [
{
"name": "default",
"server": "ms1",
"pendingRequests": 0,
"completedRequests": 0
}
],
"minThreadsConstraints": [
{
"name": "minThreadsConstraints-0",
"server": "ms1",
"completedRequests"; 0,
"pendingRequests"; 0,
"executingRequests": 0,
"outOfOrderExecutionCount":0,
"mustRunCount": 0,
"maxWaitTime": 0,
"currentWaitTime": 0
}
],
"maxThreadsConstraints": [
{
"name": "maxThreadsConstraints-0",
"server": "ms1",
"executingRequests": 0,
"deferredRequests": 0
}
],
"requestClasses": [
{
"name": "requestClasses-0",
"server": "ms1",
"requestClassType"; "fairshare",
"completedCount"; 0,
"totalThreadUse": 0,
"pendingRequestCount":0,
"virtualTimeIncrement": 0
}
]
}
},
"messages": [
]
}
用于监控域内所有数据源的 REST 资源
下面列出的 URL 返回域中配置的所有通用和 GridLink JDBC 数据源,并为每个数据源提供运行时间信息。/datasources
http(s)://
host:port
/management/tenant-monitoring/datasources
项目属性 (紧凑格式) | 类型 | 有效值 |
---|---|---|
| 字符串 | 数据源的名称。 |
| 字符串 | 数据源类型;要么或 . |
| 字符串 | 数据源实例的运行时间信息:
|
以下是 JSON 格式的 URL 响应示例:/datasources
{
"body": {
"items": [
{
"name": "genericDS",
"type": "Generic"
"instances": [
{
"server": "ms1",
"state": "Running"
},
{
"server": "ms2",
"state": "Suspended"
}
]
},
{
"name": "gridlinkDS",
"type": "GridLink",
"instances": [
{
"server": "ms1",
"state": "Running"
},
]
}
],
},
"messages": [
]
}
用于监控域内指定数据源的 REST 资源
下面列出的 URL 返回指定数据源的运行时间信息,包括 GridLink 数据源的甲骨文 RAC 统计数据。/datasources/{datasourcename}
http(s)://
host:port
/management/tenant-monitoring/datasources/{datasourcename}
项目属性 (紧凑格式) | 类型 | 有效值 |
---|---|---|
| 字符串 | 数据源的名称。 |
| 字符串 | 数据源类型;要么或 . |
| 对象或数字 | 数据源实例的运行时间信息:
|
| 对象或数字 |
|
| 对象或数字 |
|
| 对象或数字 |
|
以下是 JSON 格式的 URL 响应示例:/datasources/{datasourcename}
{
"body": {
"item": {
"name": "gridlinkDS",
"instances": [
{
"server": "ms1",
"state": 'Running",
"enabled": true,
"activeConnectionsAverageCount": 5,
…
"racInstances": [
{
"instanceName": "gridlinkDS-0",
"state": "Running",
…
},
{
"instanceName": "gridlinkDS-1",
"state": "Suspended",
…
}
]
}
}
},
"messages": [
]
}
文档辅助功能
有关甲骨文承诺无障碍的信息,请访问甲骨文无障碍计划网站。http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc
甲骨文客户可以通过我的甲骨文支持获得电子支持。如有听力受损,请访问或访问。http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs
甲骨文融合中间件使用与甲骨文WebLogic服务器的RESTful管理服务,11g发布 1 (10.3.6)
E24682-01
版权所有©2007年、2011年、甲骨文及其关联公司。保留所有权利。
本软件和相关文件根据包含使用和披露限制的许可协议提供,并受知识产权法保护。除您的许可协议中明文允许或法律允许外,您不得以任何形式或任何方式使用、复制、复制、翻译、广播、修改、许可、传输、分发、展览、执行、发布或展示任何部分。除非法律要求该软件可互操作性,否则禁止反向工程、拆卸或分解该软件。
此处包含的信息无需通知即可更改,且不保证无差错。如果您发现任何错误,请以书面形式向我们报告。
如果这是交付给美国政府或代表美国政府许可的任何人的软件或相关文档,则适用以下通知:
根据适用的联邦收购法规和特定机构补充法规,提供给美国政府客户的美国政府权利计划、软件、数据库以及相关文档和技术数据是"商业计算机软件"或"商业技术数据"。因此,使用、复制、披露、修改和改编应受适用政府合同中规定的限制和许可条款的约束,并在政府合同条款适用的情况下,受《商业计算机软件许可证》(2007年12月)中规定的附加权利的限制和许可条款的限制。甲骨文美国公司,500甲骨文百汇,红木城,CA 94065。
该软件或硬件开发用于各种信息管理应用程序的一般用途。它不开发或打算用于任何固有的危险应用程序,包括可能造成人身伤害风险的应用程序。如果您在危险应用中使用此软件或硬件,则您有责任采取所有适当的故障安全、备份、冗余和其他措施,以确保其安全使用。甲骨文公司及其附属公司不承担在危险应用中使用这种软件或硬件造成的任何损害的任何责任。
甲骨文和爪哇是甲骨文和/或其附属公司的注册商标。其他名称可能是其各自所有者的商标。
英特尔和英特尔Xeon是英特尔公司的商标或注册商标。所有 SPARC 商标均在许可下使用,是 SPARC 国际公司 AMD、Opteron、AMD 徽标和 AMD Opteron 徽标的商标或注册商标,均为高级微设备的商标或注册商标。UNIX 是开放集团的注册商标。
本软件或硬件和文档可提供第三方对内容、产品和服务的访问或信息。甲骨文公司及其附属公司不负责并明确否认任何有关第三方内容、产品和服务的任何形式的担保。甲骨文公司及其附属公司将不承担因您访问或使用第三方内容、产品或服务而造成的任何损失、成本或损害。
原文
Oracle® Fusion Middleware
Using RESTful Management Services With Oracle WebLogic Server
11g Release 1 (10.3.6)
E24682-01
November 2011
Note:
In the current release of WebLogic Server, RESTful Management Services support only the method because they are strictly limited to WebLogic Server monitoring.GET HTTP
Introduction and Roadmap
The following sections describe the contents and organization of this guide—Using RESTful Management Services With Oracle WebLogic Server:
Document Scope and Audience
WebLogic Server provides RESTful Management Services that enable you to monitor WebLogic Server outside of the Oracle Public Cloud Management Console. This document describes how to use the RESTful Management Services.
It is assumed that the reader is familiar with Java EE and general application management concepts. This document emphasizes a hands-on approach to developing a limited but useful set of RESTful monitoring services.
Guide to This Document
This document is organized as follows:
-
This section, Introduction and Roadmap, describes the scope and organization of this guide.
-
Overview, provides an overview of using the RESTful Management Service with WebLogic Server.
-
Getting Started, describes how to enable the RESTful Management Service in WebLogic Server.
-
Using REST URLs to Monitor WebLogic Server Domains, describes the formatting and usage of HTTP URLs, as well as the supported request content types.
-
Supported REST Resources for Monitoring WebLogic Server, describes the supported REST resources when monitoring WebLogic Server with RESTful Management Services.
Related Documentation
For guidelines on developing other types of management services for WebLogic Server applications, see the following documents:
-
Using WebLogic Logging Services for Application Logging describes WebLogic support for internationalization and localization of log messages, and shows you how to use the templates and tools provided with WebLogic Server to create or edit message catalogs that are locale-specific.
-
Configuring and Using the WebLogic Diagnostic Framework describes how to configure and use the WebLogic Diagnostic Framework to create, collect, analyze, archive, and access diagnostic data generated by a running server and the applications deployed within its containers.
Overview
WebLogic Server RESTful Management Services provides representational state transfer (REST) resources that enable you to monitor WebLogic Server outside of the Oracle Public Cloud Management Console. REST clients can embed fine-grained monitoring information in flexible, customized consoles that can monitor a domain's servers, clusters, applications, and data sources while they are running behind firewalls in the Oracle Public PaaS WebLogic Service. The monitoring resources are hosted by an internal Web application.
Only users that belong to the group or the group are allowed access to the RESTful Management Services. For more information about defining user roles in WebLogic Server, see "Users, Groups, And Security Roles" in Securing Resources Using Roles and Policies for Oracle WebLogic Server.Administrators
Monitors
What Can You Monitor With RESTful Management Services?
The following components of WebLogic Server can be monitored using the RESTful Management Services:
-
Server – All server instances in a domain or a specified server instance.
-
Clusters – All clusters in a domain or a specified cluster, including all server members of the cluster.
-
Applications – All applications deployed in a domain or a specified application.
-
Data sources – All data sources running in a domain or a specified data source.
What Clients Can Access RESTful Management Services?
You can access the WebLogic Server RESTful Management Services through client applications, such as:
-
Web browsers
-
cURL
-
GNU Wget
You can also use the WebLogic Server RESTful Management Services in clients that are developed in various programming languages, such as:
-
JavaScript
-
Ruby
-
Perl
-
Java
-
JavaFX
Getting Started
In order to use RESTful Management Services in a WebLogic Server domain, your WebLogic Administrator must enable them using the WebLogic Server Administration Console. For more information, see "Enable RESTful Management Services" in the Administration Console Online Help.
Using REST URLs to Monitor WebLogic Server Domains
In the current release of WebLogic Server, RESTful Management Services support only the method because they are strictly limited to WebLogic Server monitoring. Each monitored WebLogic Server resource is accessible through an HTTP uniform resource locator (URL).GET HTTP
REST URL Format to Monitor WebLogic
The format of the WebLogic Server monitoring resource URL is:
http(s)://
host:port
/management/tenant-monitoring/
path
where:
host
– the host where WebLogic Server is running
port
– the HTTP or HTTPS port
path
– the relative path that identifies an individual resource. For example, the path to a server instance would be: servers/
myserver
Supported Content Types in Requests to REST Resources
The WebLogic Server RESTful Management Services support the following representation formats:
-
JSON
-
XML
-
HTML
Clients should specify the resource representation through the HTTP header. For example, if clients is using the cURL utility, then it should specify the type through the option, as follows:-H
-
JSON – specify
-H "Accept application/json"
-
XML – specify
-H "Accept application/xml"
-
HTML – omit the option
-H
How WebLogic Server Monitoring Resources Are Represented
There are two types of WebLogic Server monitoring resource representations:
Item Resource Representation
An item resource represents an instance of a WebLogic Server entity; for example, a server instance.
JSON Format
Here is an example output of an item resource representation for a server instance using JSON:
{
"body": {
"item": {
// attributes for the item, e.g.
// "name": "adminserver"
// "state": "RUNNING",
// …
}
},
"messages": [
// an array of messages
]
}
The possible attribute value types are:
-
string, enclosed by double quotes ""
-
boolean, true or false
-
number
-
null
-
array, enclosed by "[" and "]"
-
object, enclosed by "{" and "}"
XML Format
Here is an example output of an item resource representation for a server instance using XML:
<?xml version="1.0" encoding="utf-8"?>
<data>
<object>
<property name="body">
<object>
<property name="item">
<object>
<!--
<property name="Name">
<value type="string">adminserver</value>
</property>
// other properties
-->
</object>
</property>
</object>
</property>
<property name="messages">
<array>
<!-- message objects -->
</array>
</property>
</object>
</data>
HTML Format
The HTML resource representation for an item resource is a Web page that displays the item attributes and their values in HTML list format. It should only be used for testing and debugging purposes.
Here is an example output of an item resource representation for a server instance using HTML:
Collection Resource Representation
A collection resource represents a set of WebLogic Server entities of the same type; for example, when representing all servers in a domain. Usually, an item resource exists for each entity inside the collection.
JSON Format
Here is an example output of a collection resource representation for all servers in a domain using JSON:
{
"body": {
"items": [
{
// attributes for item 1
// "name": "adminserver"
// "state": "RUNNING",
// …
},
{
// attributes for item 2
},
…
{
// attributes for item n
}
],
"messages": [
]
}
XML Format
Here is an example output of a collection resource representation for all servers in a domain using XML:
<?xml version="1.0" encoding="utf-8"?>
<data>
<object>
<property name="body">
<object>
<property name="items">
<array>
<!--
<object>
<property name="name">
<value type="string">adminserver</value>
</property>
// other properties
</object>
// other items
-->
</array>
</property>
</object>
</property>
<property name="messages">
<array>
<!--
<object>
<property name="severity">
<value type="string">WARNING</value>
</property>
<property name="message">
<value type="string">Server ms1 is not running.</value>
</property>
</object>
// other messages
-->
</array>
</property>
</object>
</data>
HTML Format
The HTML resource representation for a collection resource is a web page that displays the attributes and values for all collection items in an HTML list format. It should only be used for testing and debugging purposes.
Here is an example output of an collection resource representation for all servers in a domain using HTML:
Figure 2 Collective Resource in HTML Format
Description of "Figure 2 Collective Resource in HTML Format"
Compact versus Full Response Format
The collection resource uses a compact response format by default. That is, only a subset of all available monitoring information is returned for each item in the collection.
To get the full response format for each item, you need to add in the request parameter. For example:format=full
http://
host:port
/management/tenant-monitoring/servers?format=full
The item resource always uses a full response format that includes all monitoring information available through the REST interfaces. The body item in an Item resource contains exactly the same information as the corresponding item in a collection resource in full format.
Supported REST Resources for Monitoring WebLogic Server
This section describes the supported REST resources when monitoring WebLogic Server domains with RESTful Management Services.
-
REST Resources for Monitoring a Specified Server In a Domain,
-
REST Resources for Monitoring a Specified Cluster In a Domain,
-
REST Resources for Monitoring All Applications Deployed In a Domain,
-
REST Resources for Monitoring a Specified Application Deployed In a Domain,
-
REST Resources for Monitoring a Specified Data Source In a Domain,
REST Resources for Monitoring All Servers In a Domain
The URL listed below returns all servers configured in a domain and provides run-time information for each server, including the server state and health./servers
http(s)://
host:port
/management/tenant-monitoring/servers
Table 1 REST Resources for Monitoring All Servers In a Domain
Item Attributes (compact format) | Type | Valid Values |
---|---|---|
| string | Name of the server. |
| string | Server status. Possible states are:
|
| string | Server health state. Possible health states are:
|
Here is an example of a URL response in JSON format:/servers
{
"body": {
"items": [
{
"name": "adminserver",
"state": "RUNNING",
"health": " HEALTH_OK "
},
{
"name": "ms1",
"state": "SHUTDOWN",
"health": ""
}
],
},
"messages": [
]
}
REST Resources for Monitoring a Specified Server In a Domain
The URL listed below returns information for a specified server in a domain, including the server state, health, and JVM heap availability./servers/{servername}
http(s)://
host:port
/management/tenant-monitoring/servers/{servername}
Table 2 REST Resources for Monitoring a Specified Server In a Domain
Item Attributes | Type | Valid Values |
---|---|---|
| string | Name of the server instance. |
| string | Server status. Possible states are:
|
| string | Server health state. Possible health states are:
|
| string | Cluster to which the server belongs. |
| string | Machine on which the server is running. |
| string | Version of the WebLogic Server instance. |
| number | Current number of sockets registered for socket muxing on the server. |
| number | Current size (in bytes) of the JVM heap. |
| number | Current amount of memory (in bytes) that is available in the JVM heap. |
| string | Java version of the JVM. |
| string | Operating system on which the JVM is running. |
| string | Version of the operating system on which the JVM is running. |
| number | Average load that the VM is placing on all processors. For example, 1.0 represents 100%. |
Here is an example of a URL response in JSON format:/servers/{servername}
{
"body": {
"item": {
"name": "adminserver",
"clusterName": null,
"state": "RUNNING",
"currentMachine": "machine-0",
"weblogicVersion": "WebLogic Server 12.1.1.0.0 Thu May 5 01:17:16 2011 PDT",
"openSocketsCurrentCount": 2,
"health": "HEALTH_OK",
"heapSizeCurrent": 536870912,
"heapFreeCurrent": 39651944,
"heapSizeMax": 1073741824,
"javaVersion": "1.6.0_20",
"osName": "Linux",
"osVersion": "2.6.18-238.0.0.0.1.el5xen",
"jvmProcessorLoad": 0.25,
}
},
messages: [
]
}
REST Resources for Monitoring All Clusters In a Domain
The URL listed below returns all clusters configured in a domain and provides run-time information for each cluster and for each cluster's member servers, including all the member servers' state and health./clusters
http(s)://
host:port
/management/tenant-monitoring/clusters
Table 3 REST Resources for Monitoring All Clusters In a Domain
Item Attributes (compact format) | Type | Valid Values |
---|---|---|
| string | Name of the cluster. |
| string | Member servers of a cluster:
|
Here is an example of a URL response in JSON format:/clusters
{
"body": {
"items": [
{
"name": "mycluster1",
"servers": [
{
"name": "ms1",
"state": "RUNNING",
"health": "HEALTH_OK"
},
{
"name": "ms2",
"state": "RUNNING",
"health": "HEALTH_OVERLOADED"
}
]
}
],
},
"messages": [
]
}
REST Resources for Monitoring a Specified Cluster In a Domain
The URL listed below returns run-time information for the specified cluster and its member servers, including the member servers' state and health./clusters/{clustername}
http(s)://
host:port
/management/tenant-monitoring/clusters/{clustername}
Table 4 REST Resources for Monitoring a Specified Cluster In a Domain
Item Attributes | Type | Valid Values |
---|---|---|
| string | Name of the cluster. |
| object or number | Member servers of a cluster:
|
Here is an example of a URL response in JSON format:/cluster
{
"body": {
"item": {
"name": "mycluster1",
"servers": [
{
"name": "ms1",
"state": "RUNNING",
"health": "OK",
"clusterMaster": false,
"dropOutFrequency": "Never"
"resendRequestsCount": 0,
"fragmentsSentCount": 3708,
"fragmentsReceivedCount": 3631
},
{
"name": "ms2",
"state": "RUNNING",
"health": "OK"
...
}
]
}
},
"messages": [
]
}
REST Resources for Monitoring All Applications Deployed In a Domain
The URL listed below returns all applications deployed in the domain and their run-time information, including the application type and their state and health./applications
http(s)://
host:port
/management/tenant-monitoring/applications
Table 5 REST Resources for Monitoring All Applications Deployed In a Domain
Item Attributes (compact format) | Type | Valid Values |
---|---|---|
| string | Name of the application. |
| string | Application type. Possible types are:
|
| string | Consolidated application running status. Possible states are:
|
| string | Consolidated health state of the application. Possible health states are:
|
Here is an example of an URL response in JSON format:/applications
{
"body": {
"items": [
{
"name": "appscopedejbs",
"type": "ear",
"state": "STATE_ACTIVE",
"health": " HEALTH_OK"
},
{
"name": "MyWebApp",
"type": "war",
"state": "STATE_NEW"
}
}
],
},
"messages": [
]
}
REST Resources for Monitoring a Specified Application Deployed In a Domain
The URL returns the run-time information of a specified application, including statistics for entity beans, application-scoped work managers, and data sources./applications/{applicationname}
http(s)://
host:port
/management/tenant-monitoring/applications/{applicationname}
Table 6 REST Resources for Monitoring a Specified Application Deployed In a Domain
Item Attributes | Type | Valid Values |
---|---|---|
| string | Name of the application. |
| string | Application type. Possible types are:
|
| string | Consolidated application running status. Possible states are:
|
| string | Consolidated health state of the application. Possible health states are:
|
| object | Application running status for each target:
|
| object | Run-time information for the embedded data sources:
|
| object or number | Statistics for the Work Managers that are configured for an application:
|
| object or number | Statistics for the minimum thread constraints that are configured for an application:
|
| object or number | Statistics for maximum thread constraints that are configured for an application:
|
| object or number | Statistics for the request classes that are configured for an application:
|
Here is an example of an URL response in JSON format:/applications/{applicationname}
{
"body": {
"item": {
"name": "appscopedejbs",
"type": "ear",
"health": " HEALTH_OK ",
"state": "STATE_ACTIVE",
"targetStates": [
{
"target": "ms1",
"state": "STATE_ACTIVE",
},
{
"name": "ms2",
"state": "STATE_ACTIVE",
}
] ,
"dataSources": [
],
"entities": [
],
"workManagers": [
{
"name": "default",
"server": "ms1",
"pendingRequests": 0,
"completedRequests": 0
}
],
"minThreadsConstraints": [
{
"name": "minThreadsConstraints-0",
"server": "ms1",
"completedRequests"; 0,
"pendingRequests"; 0,
"executingRequests": 0,
"outOfOrderExecutionCount":0,
"mustRunCount": 0,
"maxWaitTime": 0,
"currentWaitTime": 0
}
],
"maxThreadsConstraints": [
{
"name": "maxThreadsConstraints-0",
"server": "ms1",
"executingRequests": 0,
"deferredRequests": 0
}
],
"requestClasses": [
{
"name": "requestClasses-0",
"server": "ms1",
"requestClassType"; "fairshare",
"completedCount"; 0,
"totalThreadUse": 0,
"pendingRequestCount":0,
"virtualTimeIncrement": 0
}
]
}
},
"messages": [
]
}
REST Resources for Monitoring All Data Sources In a Domain
The URL listed below returns all generic and GridLink JDBC data sources configured in the domain, and provides run-time information for each data source./datasources
http(s)://
host:port
/management/tenant-monitoring/datasources
Table 7 REST Resources for Monitoring All Data Sources In a Domain
Item Attributes (compact format) | Type | Valid Values |
---|---|---|
| string | Name of the data source. |
| string | Data source type; either or . |
| string | Run-time information for the data source instances:
|
Here is an example of a URL response in JSON format:/datasources
{
"body": {
"items": [
{
"name": "genericDS",
"type": "Generic"
"instances": [
{
"server": "ms1",
"state": "Running"
},
{
"server": "ms2",
"state": "Suspended"
}
]
},
{
"name": "gridlinkDS",
"type": "GridLink",
"instances": [
{
"server": "ms1",
"state": "Running"
},
]
}
],
},
"messages": [
]
}
REST Resources for Monitoring a Specified Data Source In a Domain
The URL listed below returns run-time information for the specified data source, including Oracle RAC statistics for GridLink data sources./datasources/{datasourcename}
http(s)://
host:port
/management/tenant-monitoring/datasources/{datasourcename}
Table 8 REST Resources for Monitoring a Specified Data Source In a Domain
Item Attributes (compact format) | Type | Valid Values |
---|---|---|
| string | Name of the data source. |
| string | Data source type; either or . |
| object or number | Run-time information for the data source instances:
|
| object or number |
|
| object or number |
|
| object or number |
|
Here is an example of a URL response in JSON format:/datasources/{datasourcename}
{
"body": {
"item": {
"name": "gridlinkDS",
"instances": [
{
"server": "ms1",
"state": 'Running",
"enabled": true,
"activeConnectionsAverageCount": 5,
…
"racInstances": [
{
"instanceName": "gridlinkDS-0",
"state": "Running",
…
},
{
"instanceName": "gridlinkDS-1",
"state": "Suspended",
…
}
]
}
}
},
"messages": [
]
}
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at .http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc
Access to Oracle Support
Oracle customers have access to electronic support through My Oracle Support. For information, visit or visit if you are hearing impaired.http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs
Oracle Fusion Middleware Using RESTful Management Services With Oracle WebLogic Server, 11g Release 1 (10.3.6)
E24682-01
Copyright © 2007, 2011, Oracle and/or its affiliates. All rights reserved.
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.
转载至https://docs.oracle.com/cd/E28280_01/web.1111/e24682/toc.htm#RESTS147