> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeperpam/jp/endpoint-privilege-manager/custom-tooling/http-reference-guide/health-and-status-endpoints.md).

# ヘルスとステータスエンドポイント

Keeper EPMには、サービスの生存確認、プラグインのステータス、システム全体のヘルスを確認する組み込みHTTPエンドポイントがあります。ロードバランサー、アップタイムプローブ、SIEMエージェント、カスタム自動化など既存の監視ツールと組み合わせて、管理対象の各マシンでエージェントが稼働し、想定どおりに動作していることを確認できます。

これらのエンドポイントは、ローカルのKeeperPrivilegeManagerサービスが `https://localhost:6889` (HTTPS) または `http://localhost:6888` (HTTP) で応答し、localhostにのみバインドされます。コントロールプレーンがネットワーク上に公開されることはありません。

## 公開エンドポイント <a href="#public-endpoints" id="public-endpoints"></a>

これらのエンドポイントは認証を必要とせず、マシン上の任意のプロセスから呼び出せます。監視システム、ロードバランサーのプローブ、基本的な自動化に適しています。

### サービスの生存確認 <a href="#service-liveness" id="service-liveness"></a>

```
GET /health
```

サービスが稼働中であれば `200 OK` が返されます。このエンドポイントはすべてのミドルウェアをバイパスするため、もっとも軽量な確認手段であり、高頻度の生存確認プローブ向けに適しています。

**レスポンス:**

```json
{
  "status": "healthy",
  "timestamp": "2026-06-30T10:30:00Z",
  "version": "1.0.0"
}
```

**例:**

```bash
curl -k https://localhost:6889/health
```

### サービス情報 <a href="#service-information" id="service-information"></a>

```
GET /
```

基本的なサービス識別情報が返されます。想定したポートで正しいサービスが応答しているかを確認するスモークテストに使えます。

**レスポンス:**

```json
{
  "service": "Keeper Privilege Manager",
  "status": "running",
  "version": "1.0.0"
}
```

### システムステータス <a href="#system-status" id="system-status"></a>

```
GET /api/system/status
```

プラグイン数やジョブ数を含む、サービス全体の集約ステータスが返されます。エージェントが単に稼働しているだけでなく、正常に全体が機能しているかを1回の呼び出しで把握したい場合に使います。

**レスポンス:**

```json
{
  "serviceName": "Keeper Privilege Manager",
  "status": "running",
  "timestamp": "2026-06-30T10:30:00Z",
  "uptimeSeconds": 3600.0,
  "activePlugins": 5,
  "plugins": {
    "total": 6,
    "running": 5
  },
  "jobs": {
    "total": 10,
    "enabled": 8
  }
}
```

**例:**

```bash
curl -k https://localhost:6889/api/system/status
```

## 特権エンドポイント <a href="#privileged-endpoints" id="privileged-endpoints"></a>

これらのエンドポイントは、プラグインや監視の詳細データを返し、プラグイン階層または管理用階層の認可が必要です。Keeper EPMが起動したプロセス、または昇格したコンテキスト (Windowsでは管理者、Linux/macOSでは `sudo`) から呼び出す必要があります。

### プラグインステータス <a href="#plugin-status" id="plugin-status"></a>

```
GET /api/plugins
```

サービスが認識しているすべてのプラグインのステータス (プロセスID、最終起動時刻を含む) が返されます。停止、失敗、欠落しているプラグインを特定するときに使います。

**認可:** プラグイン

**レスポンス:**

```json
{
  "plugins": [
    {
      "id": "KeeperPolicy",
      "name": "Keeper Policy Plugin",
      "status": "Running",
      "processId": 12345,
      "lastStartTime": "2026-06-30T10:00:00Z"
    }
  ],
  "count": 6
}
```

### プラグインヘルスの詳細 <a href="#plugin-health-detail" id="plugin-health-detail"></a>

```
GET /api/monitoring/plugins
```

監視対象の各プラグインについて、ヘルスステータス (Healthy、Unhealthy、Starting、Stopping、Failed)、プロセスID、稼働時間を含む詳細なヘルス情報が返されます。プロセスの存在ではなく、プラグインのヘルスに基づいてアラートを出したい場合に使います。

**認可:** プラグイン

**レスポンス:**

```json
{
  "plugins": [
    {
      "id": "KeeperPolicy",
      "status": "Healthy",
      "processId": 12345,
      "lastStartTime": "2026-06-30T10:00:00Z",
      "uptime": "2h 30m"
    }
  ]
}
```

### プラグイン監視サービスのステータス <a href="#plugin-monitoring-service-status" id="plugin-monitoring-service-status"></a>

```
GET /api/monitoring/status
```

プラグイン監視サービス自体のステータスが返されます。設定されたチェック間隔、最終チェック時刻、現在監視中のプラグインが含まれます。

**認可:** プラグイン

**レスポンス:**

```json
{
  "monitoringEnabled": true,
  "status": "Active",
  "details": {
    "isRunning": true,
    "checkIntervalMinutes": 0.5,
    "lastCheckTime": "2026-06-30T10:30:00Z",
    "totalPlugins": 6,
    "monitoredPlugins": 5,
    "monitoredPluginIds": ["KeeperPolicy", "KeeperApi", "KeeperLogger"]
  },
  "timestamp": "2026-06-30T10:30:00Z"
}
```

### サービスとプラグインヘルスの動作 <a href="#service-and-plugin-health-behavior" id="service-and-plugin-health-behavior"></a>

上記のエンドポイントに加え、Keeper EPMには組み込みの自己監視と自動復旧があります。

* **プラグイン監視ループ:** サービスはデフォルトで30秒ごとにプラグインプロセスの存在と応答性を確認します。間隔は `PluginMonitoring.CheckIntervalMinutes` 設定で変更できます。
* **プラグインの自動再起動:** 自動再起動が構成されているプラグインは、監視ループが失敗または無応答を検出したときに自動的に再起動されます。
* **サービスの自動復旧:** KeeperPrivilegeManagerサービスは、オペレーティングシステムにより障害時に再起動するよう構成されています。Windowsではサービスコントロールマネージャー (15秒の遅延、最大10回)、Linuxではsystemd (`Restart=on-failure`、15秒の遅延)、macOSではlaunchdです。

このため、一時的なプラグイン障害は多くの場合、管理者の介入なしに解消されます。一方で `/api/plugins` 上で「Running」と表示されるプラグインが、直近で再起動されている可能性もあります。インシデント調査では `lastStartTime` フィールドをログデータと照合してください。詳しくは[ログの確認](/keeperpam/jp/endpoint-privilege-manager/troubleshooting/reading-logs.md)をご参照ください。

## 推奨される監視パターン <a href="#recommended-monitoring-patterns" id="recommended-monitoring-patterns"></a>

**基本的な生存確認:** 監視システムから1〜5分ごとに `GET /health` をポーリングします。`200` 以外の応答でアラートを出します。

**運用上のヘルス:** 5分ごとに `GET /api/system/status` をポーリングします。`plugins.running` が `plugins.total` より小さい場合、またはレスポンスを解析できない場合にアラートを出します。

**プラグイン単位のアラート:** 特権コンテキスト (Keeper EPMが起動したジョブ、または昇格したスケジュールタスク) から5〜15分ごとに `GET /api/monitoring/plugins` をポーリングします。`Healthy` 以外のステータスを報告するプラグインがあればアラートを出します。

**ロードバランサーのプローブ:** `GET /health` のみを使用します。このエンドポイントはミドルウェアをバイパスし、高頻度かつ低オーバーヘッドのプローブ向けに設計されています。

## 認証に関する注記 <a href="#authentication-notes" id="authentication-notes"></a>

公開エンドポイント (`/health`、`/`、`/api/system/status`) は認証を必要とせず、一般ユーザーの権限で実行したプロセスを含め、マシン上の任意のプロセスから呼び出せます。

特権エンドポイントはプロセスベースの認証を使用します。呼び出しが成功するのは、呼び出し元プロセスが以下のいずれかである場合です。

* Keeper EPMが起動し、内部のプロセス登録簿で追跡しているプロセス
* 管理者権限で実行されているプロセス (Windowsでは管理者として実行、Linux/macOSでは `sudo`)

管理者権限のないターミナルから実行した `curl` は、特権エンドポイントから `401 Unauthorized` を受け取ります。その場で確認する場合は、ターミナルを管理者として実行するか、`sudo` を使用してください。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.keeper.io/keeperpam/jp/endpoint-privilege-manager/custom-tooling/http-reference-guide/health-and-status-endpoints.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
