26.12.2 検査データの取得
検査データはサーバーの状態に関する情報です。
次のコードを使用して、検査データを取得できます。サーバーの状態データにアクセスするには、PGX_SERVER_GET_INFO
権限が必要です。
var serverState = instance.getServerState()
JsonNode serverState = instance.getServerState();
server_state = instance.get_server_state()
これにより、ロードされたグラフの数、セッション数、グラフのメモリー使用量、プロパティなど、すべての管理情報が含まれるJsonNode
が返されます。
{
"cached_graphs": [],
"published_graphs": [],
"graphs_currently_loading": [],
"sessions": [],
"tasks": [],
"pools": [],
"memory": {}
}
sessions
パラメータは、セッションで使用されるすべてのセッションおよびメモリーを、各セッションのユーザー情報とともにリストします。
{
"session_id": "530b5f9a-75c4-4838-9cc3-44df44b035c5",
"source": "testServerState",
"user": "user1", // session user information
...
}
親トピック: 管理API