# CrowdStrike実行ジョブガイド

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FzsTwidiQ4pg6PdkE2QUR%2FCrowdStrike%20Running%20Job%20Guide.png?alt=media&#x26;token=f95d0d45-dc05-4b0c-97ae-780acfc160b0" alt=""><figcaption></figcaption></figure>

本ページでは、CrowdStrike Falconセンサーサービス (CSFalconService) が実行されているかを確認し、停止している場合は起動するジョブについて取り扱います。このジョブは、JobUpdateポリシーを使用してエンドポイントに展開されます。構成は[Windows Defender実行ジョブ](/keeperpam/jp/endpoint-privilege-manager/user-guides/windows-defender-running-job-guide.md)と同様です。

**対象**: CrowdStrike Falconセンサーを使用したWindows環境にKeeper特権マネージャーを導入するIT管理者

***

### ジョブの動作 <a href="#what-the-job-does" id="what-the-job-does"></a>

* CSFalconServiceサービス (CrowdStrike Falcon Sensor) の状態を確認します。
* サービスが停止している場合は `Start-Service -Name CSFalconService` で起動します。
* すでにサービスが稼働している場合は何もせず正常終了します。
* スケジュール (既定: 60分ごと) およびStartup時に実行し、Falconセンサーを定期的に検証し、停止していれば復旧します。

このジョブは、サービスコンテキストで単一のPowerShellタスクを使用します。エージェントは通常LOCAL SYSTEMとして実行されるため、CrowdStrikeサービスを起動できます。

### 要件 <a href="#prerequisites" id="prerequisites"></a>

* Keeper特権マネージャーのエージェントがWindowsにインストールされ、稼働していること。
* CrowdStrike Falconセンサーがインストールされていること (CSFalconServiceが存在します)。
* PowerShellが `C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe` に存在すること
* JobUpdateポリシーの作成およびプロセス構成ポリシーの実行ができること (Keeper管理コンソールなどから)。

## ジョブの定義 (完全なJSON) <a href="#job-definition-full-json" id="job-definition-full-json"></a>

このジョブJSONは、JobUpdateポリシー (Extension.JobJson) で使用するか、ファイルベースの展開用として `Jobs/ensure-crowdstrike-running.json` として保存して使用します。

```
{
  "id": "ensure-crowdstrike-running",
  "name": "Ensure CrowdStrike Falcon is running",
  "description": "Checks if the CrowdStrike Falcon sensor service (CSFalconService) is running; if not, starts it. Deploy via JobUpdate policy. Runs on schedule (default every 60 min) and on Startup.",
  "enabled": true,
  "asUser": false,
  "priority": 5,
  "schedule": {
    "intervalMinutes": 60
  },
  "events": [
    { "eventType": "Startup" }
  ],
  "parameters": [],
  "tasks": [
    {
      "id": "check-and-start-crowdstrike",
      "name": "Check CrowdStrike Falcon service and start if stopped",
      "ExecutionType": "Service",
      "command": "powershell.exe",
      "executablePath": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
      "arguments": "-NoProfile -ExecutionPolicy Bypass -Command \"& { $s = Get-Service -Name CSFalconService -ErrorAction SilentlyContinue; if (-not $s) { exit 1 }; if ($s.Status -ne 'Running') { Start-Service -Name CSFalconService -ErrorAction Stop }; exit 0 }\"",
      "expectedExitCode": 0,
      "timeoutSeconds": 30,
      "continueOnFailure": false
    }
  ],
  "mqttTopics": { "allowedPublications": ["KeeperLogger"], "allowedSubscriptions": [] },
  "osFilter": { "windows": true, "linux": false, "macOS": false }
}
```

### JobUpdateポリシーでジョブをデプロイする <a href="#deploy-the-job-via-jobupdate-policy" id="deploy-the-job-via-jobupdate-policy"></a>

1. ポリシーストアまたはKeeper管理コンソールで**JobUpdateポリシーを作成**します。
   * **PolicyType:** `JobUpdate`
   * **Status:** `enabled`
   * **Extension:**
     * **JobId:** `ensure-crowdstrike-running`
     * **Action:** `Add`
     * **JobJson:** 上記のジョブオブジェクト全体 (1行でも整形済みでも可)。
2. **ポリシー構成の例**

   ```
   {
     "PolicyId": "deploy-ensure-crowdstrike-running",
     "PolicyName": "Deploy job: Ensure CrowdStrike Falcon is running",
     "PolicyType": "JobUpdate",
     "Status": "enabled",
     "Extension": {
       "JobId": "ensure-crowdstrike-running",
       "Action": "Add",
       "JobJson": {
         "id": "ensure-crowdstrike-running",
         "name": "Ensure CrowdStrike Falcon is running",
         "description": "Checks if the CrowdStrike Falcon sensor service (CSFalconService) is running; if not, starts it.",
         "enabled": true,
         "asUser": false,
         "priority": 5,
         "schedule": { "intervalMinutes": 60 },
         "events": [{ "eventType": "Startup" }],
         "parameters": [],
         "tasks": [
           {
             "id": "check-and-start-crowdstrike",
             "name": "Check CrowdStrike Falcon service and start if stopped",
             "ExecutionType": "Service",
             "command": "powershell.exe",
             "executablePath": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
             "arguments": "-NoProfile -ExecutionPolicy Bypass -Command \"& { $s = Get-Service -Name CSFalconService -ErrorAction SilentlyContinue; if (-not $s) { exit 1 }; if ($s.Status -ne 'Running') { Start-Service -Name CSFalconService -ErrorAction Stop }; exit 0 }\"",
             "expectedExitCode": 0,
             "timeoutSeconds": 30,
             "continueOnFailure": false
           }
         ],
         "mqttTopics": { "allowedPublications": ["KeeperLogger"], "allowedSubscriptions": [] },
         "osFilter": { "windows": true, "linux": false, "macOS": false }
       }
     }
   }
   ```
3. 希望するWindowsのコレクションまたはマシン (Falconセンサーがインストールされている環境) にポリシーを割り当てます。
4. エージェントでプロセス構成ポリシーを実行し、ジョブを取り込ませます。
   * 通常のスケジュール (ポリシー同期後など) に任せます。
   * あるいは手動でトリガーします: `POST https://127.0.0.1:6889/api/Jobs/process-configuration-policies/run` (管理者認証)。
5. ジョブが存在することを確認します。\
   `GET https://127.0.0.1:6889/api/Jobs` — `ensure-crowdstrike-running` が表示されます。

***

### ジョブの実行タイミング <a href="#when-the-job-runs" id="when-the-job-runs"></a>

* **Startup**\
  エージェント (またはマシン) 起動時に1回実行されます。
* **60分ごと**\
  `schedule.intervalMinutes` に従います。間隔を変える場合はジョブJSONの `intervalMinutes` を変更します。

オンデマンドで1回だけ実行したい場合を除き、手動トリガーは不要です (例: `POST .../api/Jobs/ensure-crowdstrike-running/run`)。

### 検証 <a href="#verification" id="verification"></a>

* **サービス状態 (PowerShell)**

  ```
  Get-Service -Name CSFalconService
  ```

  ジョブ実行後 (またはテストで手動起動後) は**Running**になっている必要があります。
* **エージェントログ:** タスク `check-and-start-crowdstrike` およびPowerShellまたはサービス関連のエラーを確認します。
* **ジョブを1回だけ実行する場合 (任意)**

  ```
  Invoke-RestMethod -Method Post -Uri "https://127.0.0.1:6889/api/Jobs/ensure-crowdstrike-running/run" -SkipCertificateCheck
  ```

### トラブルシューティング <a href="#troubleshooting" id="troubleshooting"></a>

<table><thead><tr><th width="348.7734375">事象</th><th>確認するポイント</th></tr></thead><tbody><tr><td>エンドポイントにジョブがない</td><td>JobUpdateポリシーが割り当てられているか、プロセス構成ポリシーが実行済みか、<code>GET /api/Jobs</code> でジョブが返るかを確認します。</td></tr><tr><td>終了コード1</td><td>CSFalconServiceが存在しない可能性があります (Falconセンサー未インストールまたは別製品)。マシン上で <code>Get-Service CSFalconService</code> を確認します。</td></tr><tr><td>サービス起動がアクセス拒否</td><td>エージェントがサービスを起動できるアカウント (例: LOCAL SYSTEM) で動いている必要があります。</td></tr><tr><td>Start-Serviceが失敗する (例: Disabled状態)</td><td>サービスの開始種別が<strong>Automatic</strong>または<strong>Manual</strong>である必要があります。<strong>Disabled</strong>の場合はStart-Serviceは失敗します。昇格したプロンプトで <code>Set-Service -Name CSFalconService -StartupType Automatic</code> を実行するか、services.mscで設定します。</td></tr><tr><td>間隔が異なる</td><td>ポリシー内の<strong>JobJson</strong>を編集し、<code>schedule.intervalMinutes</code> を変更します (例: 30)。その後、プロセス構成ポリシーを再実行するか、修正済みジョブ全文でJobUpdateのActionを<strong>Update</strong>にして適用します。</td></tr></tbody></table>

### 参考情報 <a href="#reference" id="reference"></a>

* **ジョブID:** `ensure-crowdstrike-running`
* **ジョブファイル (ポリシーを使わない場合):** `Jobs/ensure-crowdstrike-running.json`
* **サービス名:** `CSFalconService` (CrowdStrike Falcon Sensor)
* **プラットフォーム:** Windowsのみ

Windows Defenderに同様のパターンを適用した例については、[Windows Defender実行ジョブ](/keeperpam/jp/endpoint-privilege-manager/user-guides/windows-defender-running-job-guide.md)のページをご参照ください。ジョブおよびポリシーの詳細については、「はじめに」のページ (ジョブの定義と形式、ジョブの作成・変更・削除) をご参照ください。


---

# Agent Instructions: 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:

```
GET https://docs.keeper.io/keeperpam/jp/endpoint-privilege-manager/user-guides/crowdstrike-running-job-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
