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