RESTful Management Services With Oracle WebLogic Server

监控所有服务器 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 服务器应用程序其他类型的管理服务的指南,请参阅以下文档:

概述

WebLogic 服务器 RESTful 管理服务提供表示性状态传输 (REST) 资源,使您能够在甲骨文公共云管理控制台之外监控 WebLogic 服务器。REST 客户端可以在灵活定制的控制台中嵌入细粒度监控信息,这些控制台可以在甲骨文公共 PaaS WebLogic 服务的防火墙后面运行时监控域的服务器、集群、应用程序和数据源。监控资源由内部 Web 应用程序托管。

只有属于组或组的用户才能访问 RESTful 管理服务。有关定义 WebLogic 服务器中用户角色的更多信息,请参阅甲骨文 WebLogic 服务器使用角色和策略保护资源中的"用户、组和安全角色"。AdministratorsMonitors

您可以通过恢复性管理服务监控什么?

WebLogic 服务器的以下组件可使用 RESTful 管理服务进行监控:

  • 服务器–域中或指定服务器实例中的所有服务器实例。

  • 集群-域中的所有群集或指定的集群,包括集群的所有服务器成员。

  • 应用程序–部署在域或指定应用程序的所有应用程序。

  • 数据源–在域或指定数据源中运行的所有数据源。

哪些客户端可以访问可恢复的管理服务?

您可以通过客户端应用程序访问 WebLogic 服务器恢复管理服务,例如:

  • 网络浏览器

  • 卷曲

  • 格努 · 怀特

您还可以在以各种编程语言开发的客户端中使用 WebLogic 服务器 RESTful 管理服务,例如:

  • 爪哇脚本

  • 红宝石

  • 佩尔

  • 爪哇岛

  • 爪哇FX

开始

要在 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>

HTML 格式

项目资源的 HTML 资源表示是一个以 HTML 列表格式显示项目属性及其值的网页。它只应用于测试和调试目的。

以下是使用 HTML 的服务器实例的项目资源表示的示例输出:

图1 HTML 格式中的项资源

Description of Figure 1 follows
"HTML 格式中的图 1 项资源"的描述

 

集合资源表示

集合资源表示同类型 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>

HTML 格式

集合资源的 HTML 资源表示是一个网页,以 HTML 列表格式显示所有收集项目的属性和值。它只应用于测试和调试目的。

以下是使用 HTML 在域中所有服务器的集合资源表示的示例输出:

图2 HTML 格式中的集体资源

Description of Figure 2 follows
"HTML 格式中图 2 集体资源"的描述

 

紧凑型与全响应格式

默认情况下,集合资源使用紧凑的响应格式。即仅返回集合中每个项目所有可用监控信息的子集。

要获得每个项目的完整响应格式,您需要添加请求参数。例如:format=full

http://host:port/management/tenant-monitoring/servers?format=full

项目资源始终使用完整的响应格式,包括通过 REST 接口提供的所有监控信息。项目资源中的主体项目包含与集合资源中以完整格式的相应项目完全相同的信息。

支持用于监控网络逻辑服务器的 REST 资源

本节描述了使用 RESTful 管理服务监控 WebLogic 服务器域时支持的 REST 资源。

用于监控域内所有服务器的休息资源

下面列出的 URL 返回配置在域中的所有服务器,并为每个服务器提供运行时间信息,包括服务器状态和健康状况。/servers

http(s)://host:port/management/tenant-monitoring/servers

表 1 用于监控域内所有服务器的 REST 资源

项目属性
(紧凑格式)
类型有效值

name

字符串

服务器名称。

state

字符串

服务器状态。可能的状态是:

  • 运行

  • 开始

  • 待机

  • 管理

  • 恢复

  • 关闭

health

字符串

服务器健康状况。可能的健康状态是:

  • HEALTH_OK

  • HEALTH_WARN

  • HEALTH_CRITICAL

  • HEALTH_FAILED

  • HEALTH_OVERLOADED

  • 未知

以下是 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}

表2 用于监控域内指定服务器的 REST 资源

项目属性类型有效值

name

字符串

服务器实例的名称。

state

字符串

服务器状态。可能的状态是:

  • 运行

  • 开始

  • 待机

  • 管理

  • 恢复

  • 关闭

health

字符串

服务器健康状况。可能的健康状态是:

  • HEALTH_OK

  • HEALTH_WARN

  • HEALTH_CRITICAL

  • HEALTH_FAILED

  • HEALTH_OVERLOADED

  • 未知

clusterName

字符串

服务器所属的集群。

currentMachine

字符串

服务器运行的机器。

weblogicVersion

字符串

Web逻辑服务器实例的版本。

openSocketsCurrentCount

当前在服务器上注册的插座数。

heapSizeCurrent

JVM堆的当前大小(以字节)。

heapFreeCurrent

JVM 堆中可用的当前内存量(以字节表示)。

javaVersion

字符串

日本合资公司爪哇版。

osName

字符串

合资企业运行的操作系统。

osVersion

字符串

JVM 运行的操作系统的版本。

jvmProcessorLoad

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

表 3 用于监控域内所有集群的 REST 资源

项目属性
(紧凑格式)
类型有效值

name

字符串

集群名称。

servers

字符串

集群成员服务器:

  • name–成员服务器名称。

  • state–成员服务器状态。可能的状态是:

    • 运行

    • 开始

    • 待机

    • 管理

    • 恢复

    • 关闭

  • health–成员服务器健康状况。可能的状态是:

    • HEALTH_OK

    • HEALTH_WARN

    • HEALTH_CRITICAL

    • HEALTH_FAILED

    • HEALTH_OVERLOADED

    • 未知

以下是 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}

表 4 用于监控域内指定集群的 REST 资源

项目属性类型有效值

name

字符串

集群名称。

servers

对象或数字

集群成员服务器:

  • name–成员服务器实例的名称。

  • state:成员服务器状态:

    • 开始

    • 运行

    • 待机

    • 管理

    • 恢复

    • 关闭

  • health:成员服务器健康状况:

    • HEALTH_OK

    • HEALTH_WARN

    • HEALTH_CRITICAL

    • HEALTH_FAILED

    • HEALTH_OVERLOADED

    • 未知

  • clusterMaster–(对象)如果服务器是配置为服务器迁移的集群的集群主机,则为真。

  • dropOutFrequency–(数字)从集群的角度来看,相对衡量服务器无法到达的次数。

  • resendRequestsCount–(编号)由于集群中的接收服务器未收到消息而不得不重新发送的状态三角洲消息的数量。

  • fragmentsSentCount–从服务器发送到集群的消息片段总数。这适用于多广播和单播消息类型。

  • fragmentsReceivedCount–(数字)从集群在服务器上接收的消息总数。这适用于多广播和单播消息类型。

以下是 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

表 5 用于监控部署在域内的所有应用的 REST 资源

项目属性
(紧凑格式)
类型有效值

name

字符串

应用程序的名称。

type

字符串

应用程序类型。可能的类型是:

  • 耳朵

  • 战争

  • 埃伊布

  • 拉尔

  • 杰姆斯

  • 杰德布克

state

字符串

合并应用程序运行状态。可能的状态是:

  • STATE_NEW

  • STATE_FAILED

  • STATE_RETIRED

  • STATE_PREPARED

  • STATE_ADMIN

  • STATE_ACTIVE

  • STATE_UPDATE_PENDING

health

字符串

应用的合并健康状况。可能的健康状态是:

  • HEALTH_OK

  • HEALTH_WARN

  • HEALTH_CRITICAL

  • HEALTH_FAILED

  • HEALTH_OVERLOADED

  • 未知

以下是 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}

表 6 用于监控部署在域中的指定应用程序的 REST 资源

项目属性类型有效值

name

字符串

应用程序的名称。

type

字符串

应用程序类型。可能的类型是:

  • 耳朵

  • 战争

  • 埃伊布

  • 拉尔

  • 杰姆斯

  • 杰德布克

state

字符串

合并应用程序运行状态。可能的状态是:

  • STATE_NEW

  • STATE_FAILED

  • STATE_RETIRED

  • STATE_PREPARED

  • STATE_ADMIN

  • STATE_ACTIVE

  • STATE_UPDATE_PENDING

health

字符串

应用的合并健康状况。可能的健康状态是:

  • HEALTH_OK

  • HEALTH_WARN

  • HEALTH_CRITICAL

  • HEALTH_FAILED

  • HEALTH_OVERLOADED

  • 未知

targetStates

对象

每个目标的应用程序运行状态:

  • target–目标名称。

  • state–特定目标的应用程序运行状态。可能的状态是:

    • STATE_NEW

    • STATE_FAILED

    • STATE_RETIRED

    • STATE_PREPARED

    • STATE_ADMIN

    • STATE_ACTIVE

    • STATE_UPDATE_PENDING

dataSources

对象

嵌入式数据源的运行时间信息:

  • name–数据源实例的名称。

  • server–数据源实例运行的服务器的名称。

  • state–数据源实例的当前状态。可能的状态是:

    • 运行

    • 暂停

    • 关闭

    • 重载

    • 未知

workManagers

对象或数字

为应用程序配置的工作经理的统计数据:

  • name–(字符串)工作经理的名称。

  • server–(字符串)工作管理器关联的服务器的名称。

  • pendingRequests–(编号)在队列中等待的待处理请求数量。

  • completedRequests–已处理的请求数量。

minThreadsConstraints

对象或数字

适用于应用程序的最小线程约束的统计:

  • name–(字符串)最小线程约束的名称。

  • server–(字符串)与最小线程约束相关的服务器名称。

  • pendingRequests–等待可用线程的待处理请求数量。

  • completedRequests–已处理的已完成请求数量。

  • executingRequests–(数量)当前执行的请求数量。

  • outOfOrderExecutionCount–(数量)出于转换而执行的请求数量,以满足约束。

  • mustRunCount–(数量)必须执行满足约束的请求数量。

  • maxWaitTime–(数字)请求等待线程的最大时间。只考虑其执行需要满足约束的请求。

  • currentWaitTime–(数字)请求等待线程的最后测量时间。只考虑其执行需要满足约束的请求。

maxThreadsConstraints

对象或数字

为应用程序配置的最大线程约束的统计:

  • name–(字符串)最大线程约束的名称。

  • server–(字符串)服务器的名称的最大线程约束关联。

  • executingRequests–(数量)当前执行的请求数量。

  • deferredRequests–(数量)因超出约束而被拒绝执行线程的请求数量。

requestClasses

对象或数字

为应用程序配置的请求类的统计信息:

  • name–(字符串)请求类的名称。

  • server–(字符串)请求关联的服务器名称。

  • requestClassType–(字符串)请求类的类型,可以是"公平共享"、"响应时间"或"上下文"

  • completedCount–(数字)自服务器启动以来已完成请求的总数量。

  • totalThreadUse–(数字)自服务器启动以来请求类使用的线程使用时间总金额为毫秒。

  • pendingRequestCount–等待线程可用的待处理请求数量。

  • virtualTimeIncrement–(编号)当前请求类的优先级。优先级相对于其他请求类优先级。优先级是经常动态计算的,因此可以更改。

以下是 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

表 7 用于监控域内所有数据源的 REST 资源

项目属性
(紧凑格式)
类型有效值

name

字符串

数据源的名称。

type

字符串

数据源类型;要么或 .GenericGridLink

instances

字符串

数据源实例的运行时间信息:

  • server–数据源实例运行的服务器实例。

  • state–数据源实例的当前状态。可能的状态是:

    • 运行

    • 暂停

    • 关闭

    • 重载

    • 未知

以下是 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}

表 8 用于监控域内指定数据源的 REST 资源

项目属性
(紧凑格式)
类型有效值

name

字符串

数据源的名称。

type

字符串

数据源类型;要么或 .GenericGridLink

instances

对象或数字

数据源实例的运行时间信息:

  • server–(字符串)数据源实例运行的服务器名称。

  • state–(字符串)数据源实例的当前状态。可能的状态是:

    • 运行

    • 暂停

    • 关闭

    • 重载

    • 未知

  • enabled–如果启用数据源,则(布尔)为真。

  • versionJDBCDriver–(字符串)用于创建数据库连接的JDBC驱动程序的驱动程序类名称。

  • activeConnectionsAverageCount–(数字)数据源中活动连接的平均数目。

  • activeConnectionsCurrentCount–(编号)应用程序当前使用的连接数量。

  • activeConnectionsHighCount–(数字)自数据源被即时化以来,数据源实例中的活动数据库连接数量最多。

  • connectionDelayTime–(数字)创建与数据库的物理连接所需的平均时间(以毫秒为毫秒)。

  • connectionsTotalCount–(数字)自数据源部署以来,在数据源中创建的数据库连接累计总数。

  • currCapacity–(编号)数据源中连接池中JDBC连接的当前计数。

  • currCapacityHighCount–(数字)数据源中可用或正在使用的数据库连接数量(当前容量)自部署以来

  • failedReserveRequestCount–(数字)无法满足的数据源请求的累计运行计数。

  • failuresToReconnectCount–(编号)刷新数据库连接的失败尝试次数。

instances (续)

对象或数字

  • highestNumAvailable–(数字)自部署以来,在数据源中随时可供应用程序使用的未使用和可用的数据库连接数量最高

  • leakedConnectionCount–(编号)泄露连接的数量。

  • numAvailable–(编号)当前处于闲置状态且可供数据源中的应用程序使用的数据库连接数量。

  • numUnavailable–(编号)当前用于池的连接数量

  • prepStmtCacheAccessCount–(数字)对访问语句缓存的次数进行累计运行计数。

  • prepStmtCacheAddCount–(数字)添加到对帐单缓存中的声明数的累计运行计数。

  • prepStmtCacheCurrentSize–(编号)当前缓存在语句缓存中的已准备好和可调用语句数。

  • prepStmtCacheDeleteCount–(数字)从缓存中丢弃的语句的累积运行计数。

  • prepStmtCacheHitCount–(数字)累计运行计数使用缓存中语句的次数。

  • prepStmtCacheMissCount–(编号)对缓存的语句请求不满意的次数。

  • reserveRequestCount–(数字)从数据源请求连接的累计运行计数。

  • waitSecondsHighCount–(编号)自连接池被即时化以来,应用程序等待连接的最高秒数(最长的连接储备等待时间)。

  • waitingForConnectionCurrentCount–等待数据库连接的连接请求数量。

  • waitingForConnectionFailureTotal–(数字)从数据源请求的累积运行计数,该请求必须等待才能获得连接,最终无法获得连接。

  • waitingForConnectionHighCount–(数字)同时等待数据源连接的应用程序请求数量最多。

instances (续)

对象或数字

  • waitingForConnectionSuccessTotal–(数字)从数据源请求的累积运行计数,该请求必须等待才能获得连接,并最终成功获得连接。

  • waitingForConnectionTotal–(数字)从数据源请求的累积运行计数,这些请求必须等待才能获得连接,包括最终获得连接的请求和未获得连接的请求。

  • successfulRclbBasedBorrowCount–(数量)发现现有连接满足运行时连接负载平衡策略的保留请求数量。

  • failedRCLBBasedBorrowCount–(数量)未根据运行时连接负载平衡策略找到连接的保留请求数量。

  • successfulAffinityBasedBorrowCount–(数量)发现现有连接符合亲和力政策的保留请求数量。

  • failedAffinityBasedBorrowCount–未找到现有亲和力政策的连接的保留请求数量。

  • racInstances–甲骨文RAC实例统计:

    • instanceName–(字符串)甲骨文RAC实例的名称。

    • state–(字符串)数据源中的甲骨文RAC实例的当前状态:运行、暂停、关闭、超载和未知。

    • enabled–如果启用甲骨文RAC实例,则(布尔)为真。

    • signature–(字符串)唯一标识甲骨文RAC实例的签名。

    • currentWeight–(数字)甲骨文RAC实例的当前重量。

    • activeConnectionsCurrentCount–(编号)应用程序当前使用的连接数量。

    • reserveRequestCount–(数字)甲骨文RAC实例中连接请求的累计运行计数。

instances (续)

对象或数字

  • racInstances(续):

    • connectionsTotalCount–(数字)自数据源部署以来,甲骨文RAC实例中创建的数据库连接累计总数。

    • currCapacity–(数字)甲骨文RAC实例数据源中连接池中的JDBC连接的当前计数。

    • numAvailable–(编号)甲骨文RAC实例的数据源中当前可用(未使用)的数据库连接数量。

    • numUnavailable–甲骨文RAC实例中当前不可用(正在使用或正在由系统测试)的数据库连接数量。

以下是 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=infohttp://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:

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.AdministratorsMonitors

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:

Figure 1 Item Resource in HTML Format

Description of Figure 1 follows
Description of "Figure 1 Item Resource in HTML Format"

 

Collection Resource Representation

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 follows
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 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)
TypeValid Values

name

string

Name of the server.

state

string

Server status. Possible states are:

  • RUNNING

  • STARTING

  • STANDBY

  • ADMIN

  • RESUMING

  • SHUTDOWN

health

string

Server health state. Possible health states are:

  • HEALTH_OK

  • HEALTH_WARN

  • HEALTH_CRITICAL

  • HEALTH_FAILED

  • HEALTH_OVERLOADED

  • UNKNOWN

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 AttributesTypeValid Values

name

string

Name of the server instance.

state

string

Server status. Possible states are:

  • RUNNING

  • STARTING

  • STANDBY

  • ADMIN

  • RESUMING

  • SHUTDOWN

health

string

Server health state. Possible health states are:

  • HEALTH_OK

  • HEALTH_WARN

  • HEALTH_CRITICAL

  • HEALTH_FAILED

  • HEALTH_OVERLOADED

  • UNKNOWN

clusterName

string

Cluster to which the server belongs.

currentMachine

string

Machine on which the server is running.

weblogicVersion

string

Version of the WebLogic Server instance.

openSocketsCurrentCount

number

Current number of sockets registered for socket muxing on the server.

heapSizeCurrent

number

Current size (in bytes) of the JVM heap.

heapFreeCurrent

number

Current amount of memory (in bytes) that is available in the JVM heap.

javaVersion

string

Java version of the JVM.

osName

string

Operating system on which the JVM is running.

osVersion

string

Version of the operating system on which the JVM is running.

jvmProcessorLoad

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)
TypeValid Values

name

string

Name of the cluster.

servers

string

Member servers of a cluster:

  • name – the member server name.

  • state – member server status. Possible states are:

    • RUNNING

    • STARTING

    • STANDBY

    • ADMIN

    • RESUMING

    • SHUTDOWN

  • health – member server health state. Possible states are:

    • HEALTH_OK

    • HEALTH_WARN

    • HEALTH_CRITICAL

    • HEALTH_FAILED

    • HEALTH_OVERLOADED

    • UNKNOWN

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 AttributesTypeValid Values

name

string

Name of the cluster.

servers

object or number

Member servers of a cluster:

  • name – Name of the member server instance.

  • state: member server status:

    • STARTING

    • RUNNING

    • STANDBY

    • ADMIN

    • RESUMING

    • SHUTDOWN

  • health: member server health state:

    • HEALTH_OK

    • HEALTH_WARN

    • HEALTH_CRITICAL

    • HEALTH_FAILED

    • HEALTH_OVERLOADED

    • UNKNOWN

  • clusterMaster – (object) True if the server is the cluster master of a cluster which is configured for server migration.

  • dropOutFrequency – (number) A relative measure of the number of times that a server has become unreachable from the cluster perspective.

  • resendRequestsCount – (number) Number of state-delta messages that had to be re-sent because a receiving server in the cluster missed a message.

  • fragmentsSentCount – (number) Total number of message fragments sent from the server into the cluster. This is applicable to both multicast and unicast message types.

  • fragmentsReceivedCount – (number) Total number of messages received on the server from the cluster. This is applicable to both multicast and unicast message types.

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)
TypeValid Values

name

string

Name of the application.

type

string

Application type. Possible types are:

  • ear

  • war

  • ejb

  • rar

  • jms

  • jdbc

state

string

Consolidated application running status. Possible states are:

  • STATE_NEW

  • STATE_FAILED

  • STATE_RETIRED

  • STATE_PREPARED

  • STATE_ADMIN

  • STATE_ACTIVE

  • STATE_UPDATE_PENDING

health

string

Consolidated health state of the application. Possible health states are:

  • HEALTH_OK

  • HEALTH_WARN

  • HEALTH_CRITICAL

  • HEALTH_FAILED

  • HEALTH_OVERLOADED

  • UNKNOWN

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 AttributesTypeValid Values

name

string

Name of the application.

type

string

Application type. Possible types are:

  • ear

  • war

  • ejb

  • rar

  • jms

  • jdbc

state

string

Consolidated application running status. Possible states are:

  • STATE_NEW

  • STATE_FAILED

  • STATE_RETIRED

  • STATE_PREPARED

  • STATE_ADMIN

  • STATE_ACTIVE

  • STATE_UPDATE_PENDING

health

string

Consolidated health state of the application. Possible health states are:

  • HEALTH_OK

  • HEALTH_WARN

  • HEALTH_CRITICAL

  • HEALTH_FAILED

  • HEALTH_OVERLOADED

  • UNKNOWN

targetStates

object

Application running status for each target:

  • target – Name of the target.

  • state – Application running status for the specified target. Possible states are:

    • STATE_NEW

    • STATE_FAILED

    • STATE_RETIRED

    • STATE_PREPARED

    • STATE_ADMIN

    • STATE_ACTIVE

    • STATE_UPDATE_PENDING

dataSources

object

Run-time information for the embedded data sources:

  • name – Name of the data source instance.

  • server – Name of the server on which the data source instance is running.

  • state – Current state of the data source instance. Possible states are:

    • Running

    • Suspend

    • Shutdown

    • Overloaded

    • Unknown

workManagers

object or number

Statistics for the Work Managers that are configured for an application:

  • name – (string) Name of the Work Manager.

  • server – (string) Name of the server the Work Manager is associated with.

  • pendingRequests – (number) Number of pending requests waiting in the queue.

  • completedRequests – (number) Number of requests that have been processed.

minThreadsConstraints

object or number

Statistics for the minimum thread constraints that are configured for an application:

  • name – (string) Name of the minimum thread constraint.

  • server – (string) Name of the sever the minimum thread constraint is associated with.

  • pendingRequests – (number) Number of pending requests waiting for an available thread.

  • completedRequests – (number) Number of completed requests that have been processed.

  • executingRequests – (number) Number of requests that are currently executing.

  • outOfOrderExecutionCount – (number) Number of requests executed out of turn to satisfy the constraint.

  • mustRunCount – (number) Number of requests that must be executed to satisfy the constraint.

  • maxWaitTime – (number) Maximum amount of time a request had to wait for a thread. Only requests whose execution is needed to satisfy the constraint are considered.

  • currentWaitTime – (number) Last measured amount of time a request had to wait for a thread. Only requests whose execution is needed to satisfy the constraint are considered.

maxThreadsConstraints

object or number

Statistics for maximum thread constraints that are configured for an application:

  • name – (string) Name of the maximum thread constraint.

  • server – (string) Name of the server the maximum thread constraint is associated with.

  • executingRequests – (number) Number of requests that are currently executing.

  • deferredRequests – (number) Number of requests that are denied a thread for execution because the constraint is exceeded.

requestClasses

object or number

Statistics for the request classes that are configured for an application:

  • name – (string) Name of the request class.

  • server – (string) Name of the server the request is associated with.

  • requestClassType – (string) Type of request class, which can either be "fairshare", "responsetime" or 'context"

  • completedCount – (number) Total number of completed requests since the server was started.

  • totalThreadUse – (number) Total amount of thread use time in millisecond used by the request class since the server was started.

  • pendingRequestCount – (number) Number of pending requests waiting for a thread to become available.

  • virtualTimeIncrement – (number) Current priority of the request class. The priority is relative to other request class priorities. The priority is frequently, dynamically calculated, and so can change.

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)
TypeValid Values

name

string

Name of the data source.

type

string

Data source type; either or .GenericGridLink

instances

string

Run-time information for the data source instances:

  • server – The server instance on which the data source instance is running.

  • state – The current state of the data source instance. Possible states are:

    • Running

    • Suspended

    • Shutdown

    • Overloaded

    • Unknown

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)
TypeValid Values

name

string

Name of the data source.

type

string

Data source type; either or .GenericGridLink

instances

object or number

Run-time information for the data source instances:

  • server – (string) Name of server on which the data source instance is running.

  • state – (string) Current state of the data source instance. Possible states are:

    • Running

    • Suspended

    • Shutdown

    • Overloaded

    • Unknown

  • enabled – (boolean) True if the data source is enabled.

  • versionJDBCDriver – (string) Driver class name of the JDBC driver used to create database connections.

  • activeConnectionsAverageCount – (number) Average number of active connections in the data source.

  • activeConnectionsCurrentCount – (number) Number of connections currently in use by applications.

  • activeConnectionsHighCount – (number) Highest number of active database connections in the instance of the data source since the data source was instantiated.

  • connectionDelayTime – (number) Average amount of time, in milliseconds, that it takes to create a physical connection to the database.

  • connectionsTotalCount – (number) Cumulative total number of database connections created in the data source since the data source was deployed.

  • currCapacity – (number) Current count of JDBC connections in the connection pool in the data source.

  • currCapacityHighCount – (number) Highest number of database connections available or in use (current capacity) in the data source since it was deployed

  • failedReserveRequestCount – (number) Cumulative running count of requests for a connection from the data source that could not be fulfilled.

  • failuresToReconnectCount – (number) Number of failed attempts to refresh a database connection.

instances (Cont.)

object or number

  • highestNumAvailable – (number) Highest number of database connections that were idle and available to be used by an application at any time in the data source since it was deployed

  • leakedConnectionCount – (number) Number of leaked connections.

  • numAvailable – (number) Number of database connections that are currently idle and available to be used by applications in the data source.

  • numUnavailable – (number) Number of connections currently in use for the pool

  • prepStmtCacheAccessCount – (number) Cumulative running count of the number of times that the statement cache was accessed.

  • prepStmtCacheAddCount – (number) Cumulative running count of the number of statements added to the statement cache.

  • prepStmtCacheCurrentSize – (number) Number of prepared and callable statements currently cached in the statement cache.

  • prepStmtCacheDeleteCount – (number) Cumulative running count of statements discarded from the cache.

  • prepStmtCacheHitCount – (number) Cumulative running count of the number of times that statements from the cache were used.

  • prepStmtCacheMissCount – (number) Number of times that a statement request could not be satisfied with a statement from the cache.

  • reserveRequestCount – (number) Cumulative running count of requests for a connection from the data source.

  • waitSecondsHighCount – (number) Highest number of seconds that an application waited for a connection (the longest connection reserve wait time) from the connection pool since the connection pool was instantiated.

  • waitingForConnectionCurrentCount – (number) Number of connection requests waiting for a database connection.

  • waitingForConnectionFailureTotal – (number) Cumulative running count of requests for a connection from the data source that had to wait before getting a connection and eventually failed to get a connection.

  • waitingForConnectionHighCount – (number) Highest number of application requests concurrently waiting for a connection from the data source.

instances (Cont.)

object or number

  • waitingForConnectionSuccessTotal – (number) Cumulative running count of requests for a connection from the data source that had to wait before getting a connection and eventually succeeded in getting a connection.

  • waitingForConnectionTotal – (number) Cumulative running count of requests for a connection from the data source that had to wait before getting a connection, including those that eventually got a connection and those that did not get a connection.

  • successfulRclbBasedBorrowCount – (number) Number of reserve requests for which existing connections were found that satisfied the run-time connection load balancing policy.

  • failedRCLBBasedBorrowCount – (number) Number of reserve requests for which a connection was not found based on the run-time connection load balancing policy.

  • successfulAffinityBasedBorrowCount – (number) Number of reserve requests for which an existing connection was found that satisfied the affinity policy.

  • failedAffinityBasedBorrowCount – (number) Number of reserve requests for which an existing connection for the affinity policy was not found.

  • racInstances – Oracle RAC instance statistics:

    • instanceName – (string) Name of the Oracle RAC instance.

    • state – (string) Current state of the Oracle RAC instance within the data source: Running, Suspended, Shutdown, Overloaded, and Unknown.

    • enabled – (boolean) True if the Oracle RAC instance is enabled.

    • signature – (string) Signature that uniquely identifies the Oracle RAC instance.

    • currentWeight – (number) Current weight of the Oracle RAC instance.

    • activeConnectionsCurrentCount – (number) Number of connections currently in use by applications.

    • reserveRequestCount – (number) Cumulative running count of requests for a connection from the Oracle RAC instance.

instances (Cont.)

object or number

  • racInstances (Cont.):

    • connectionsTotalCount – (number) Cumulative total number of database connections created in the Oracle RAC instance since the data source was deployed.

    • currCapacity – (number) Current count of JDBC connections in the connection pool in the data source for the Oracle RAC instance.

    • numAvailable – (number) Number of database connections currently available (not in use) in the data source for the Oracle RAC instance.

    • numUnavailable – (number) Number of database connections that are currently unavailable (in use or being tested by the system) in the Oracle RAC instance.

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=infohttp://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

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值