サーバーのモニター

GETリクエストを送信して、管理サーバーおよび管理対象サーバーをモニターできます。次のステップは、cURLを使用してこのGETリクエストを構築する方法を示しています:
  1. ドメインの管理サーバーのホスト名およびポートを特定し、/management/weblogic/latest/serverRuntimeエンドポイントを使用してGETリクエストを作成します。このWebLogic Serverリクエストでは次のURL構造を使用します:
    http://localhost:7001/management/weblogic/latest/serverRuntime
  2. cURLコマンド・ラインでヘッダーを指定します。
    • -H X-Requested-By:MyClient

    • -H Accept:application/json

  3. GETリクエストを作成します。URLでfieldsパラメータを使用して、リクエストによって返されるようにするサーバーのプロパティ(例に示すように、名前、全体のヘルス状態、管理サーバーURLなど)を指定します。

    curl -v \
    --user admin:admin123 \
    -H X-Requested-By:MyClient \
    -H Accept:application/json \
    -X GET http://localhost:7001/management/weblogic/latest/serverRuntime?fields=name,openSocketsCurrentCount,overallHealthState,administrationURL&links=self

GETリクエストによって、サーバーの名前、サーバーのヘルス状態および管理サーバーURLが返されます。

HTTP/1.1 200 OK

Response Body:
{
    "links": [{
        "rel": "self",
        "href": "http:\//localhost:7001/management/weblogic/latest/serverRuntime"
    }],
    "overallHealthState": {
        "state": "ok",
        "subsystemName": null,
        "partitionName": null,
        "symptoms": []
    },
    "openSocketsCurrentCount": 1,
    "administrationURL": "t3:\//localhost:7001",
    "name": "AdminServer"
}