管理対象サーバーが実行されていることの確認

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

    • -H Accept:application/json

  3. GETリクエストを作成し、fieldsパラメータに'name'および'state'を指定すると、次の例に示すように、リクエストがサーバーの名前と状態が返されます。

    http://localhost:7001/management/weblogic/latest/domainRuntime/serverRuntimes?links=none&fields=name,state

GETリクエストの全体は、次のサンプルのとおりです。

curl -v \
--user admin:admin123 \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-X GET http://localhost:7001/management/weblogic/latest/domainRuntime/serverRuntimes?links=none&fields=name,state

このGETリクエストは、ドメインのサーバーの名前とその状態を返します。

HTTP/1.1 200 OK
Response Body:
{"items": [
    {
        "state": "RUNNING",
        "name": "Cluster1Server1"
    },
    {
        "state": "RUNNING",
        "name": "AdminServer"
    },
    {
        "state": "RUNNING",
        "name": "Cluster1Server2"
    }
]}