> For the complete documentation index, see [llms.txt](https://docs.nexthink.com/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexthink.com/platform/platform/ja/user-guide/alerts-and-diagnostics/setting-up-and-managing-monitors/creating-custom-monitors/detecting-issues-impacting-a-single-device-or-user.md).

# 単一のデバイスまたはユーザーに影響する問題の検出

{% hint style="info" %}
NQL を使用して既存のアラートに関連するデバイスを調査およびクエリする方法については、[アラートに関する FAQ](/platform/platform/ja/user-guide/alerts-and-diagnostics/alerts-faq.md#how-can-i-investigate-and-query-devices-associated-with-an-existing-alert)を参照してください。
{% endhint %}

単一のデバイスまたはユーザーで発生する問題を検出し、ユーザーがチケットを起票する前に、L1 サポートチームがプロアクティブに対応して修復できるようにします。

デバイスまたはユーザーごとにメトリックを評価するモニターを設定するには、追加の集計を行わずに算出済みメトリックを含むデバイスのリストを返す NQL クエリを作成します。これは、次の二つの方法で実現できます。

1. `devices`、`mobile_devices`、または `users` テーブルから開始し、いずれかのテーブルを events テーブルと結合して、メトリックを算出します。

{% code overflow="wrap" lineNumbers="true" %}

```
devices
| with device_performance.system_crashes during past 7d
| compute total_number_of_system_crashes = number_of_system_crashes.sum()
```

{% endcode %}

2. events テーブルから始め、メトリックを要約し、device ごとにグループ化する `by` を追加します。

{% code overflow="wrap" lineNumbers="true" %}

```
device_performance.system_crashes during past 7d
| summarize total_number_of_system_crashes = number_of_system_crashes.sum() by device.collector.uid
```

{% endcode %}

### **通知:**

システムは、影響を受けるデバイスまたはユーザーごとに個別に通知を送信し、ペイロードにデバイス名またはユーザー名を含めます。

### **アラート概要ダッシュボード**

アラート概要ダッシュボードでは、すべてのデバイスおよびユーザーのアラートがまとめられ、単一の行に表示されます。影響を受けるデバイス列には、アラートが発生しているデバイス数が表示されます。

### **考慮事項**

* 多数のオブジェクトで同時にアラートがトリガーされることが予想される場合は、このタイプのクエリを使用しないでください。 Nexthink では、モニターごとの同時トリガー数を 500 に制限しています。外部システムへのレポートには、[Data Export](/platform/platform/ja/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/outbound-connectors/data-exporters.md) または [Webhooks](/platform/platform/ja/configuring_nexthink/bringing-data-into-your-nexthink-instance/integrating-nexthink-with-third-party-tools/outbound-connectors/webhooks.md) の使用を検討してください。
* このタイプのクエリでは、`summarize… by device.name` 構文を使用しないでください。想定どおりにデバイスごとのアラートがトリガーされません。

## NQL の例 <a href="#detectingissuesimpactingasingledeviceoruser-nqlexamples" id="detectingissuesimpactingasingledeviceoruser-nqlexamples"></a>

以下に、モニターの作成および編集に役立つ NQL クエリの例を示します。クエリを確認し、作成または編集するモニターに最も近いものを選択します。クエリをコピーし、例として示されているしきい値を含めて、ユースケースに合わせて調整します。

### 週あたりのシステムクラッシュ数が多いデバイス（>=3）

このアラートはデバイスごとにトリガーされ、ペイロードにはデバイス名が含まれます。

{% code overflow="wrap" lineNumbers="true" %}

```
devices
| with device_performance.system_crashes during past 7d 
| compute total_number_of_system_crashes = number_of_system_crashes.sum()
| sort total_number_of_system_crashes desc
```

{% endcode %}

または

{% code overflow="wrap" lineNumbers="true" %}

```
device_performance.system_crashes during past 7d
| summarize total_number_of_system_crashes = number_of_system_crashes.sum() by device.collector.uid
```

{% endcode %}

次の例では、グループ化に `device.collector.uid` を使用します。システムは通知にデバイス名を含めます。

<figure><img src="https://3549141153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLm8O7QKZDn6z806e7Sv%2Fuploads%2Fgit-blob-3efee1ca578d3f4adacb38a1ba59da1b1d17c036%2Falert-1678884858.png?alt=media&amp;token=f4f7509f-263a-4ce2-beac-31bf80389a89" alt=""><figcaption></figcaption></figure>

### 14 日間のローリングウィンドウにおけるモバイルデバイスの平均メモリ使用率の高さを検出

{% code overflow="wrap" %}

```
device_performance.mobile_events during past 24h
| summarize used_memory_percentage = memory.free.avg() * 100 / mobile_device.hardware.memory.avg() by mobile_device.uid
```

{% endcode %}

<figure><img src="https://3549141153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLm8O7QKZDn6z806e7Sv%2Fuploads%2Fgit-blob-c5bfd9b09a901679de9075ff5129b9798d35f668%2Fimage%20(1248).png?alt=media" alt=""><figcaption></figcaption></figure>

### 直近の週でシステムドライブ使用率が高いデバイス（>=90）

このアラートはデバイスごとにトリガーされ、ペイロードにはデバイス名が含まれます。

{% code overflow="wrap" lineNumbers="true" %}

```
devices during past 7d
| include device_performance.events during past 7d
| compute system_drive_usage_ratio_ = event.system_drive_usage.avg()/event.system_drive_capacity.avg()*100
| list system_drive_usage_ratio_
```

{% endcode %}

<figure><img src="https://3549141153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLm8O7QKZDn6z806e7Sv%2Fuploads%2Fgit-blob-a39c75805bf3cfb3f579d66efb22b1a698be42c1%2Fimage-20231016-121713.png?alt=media&amp;token=f5b6bc78-3b69-42be-98f1-5ae019f85460" alt=""><figcaption></figcaption></figure>

### Salesforce アプリにアクセスする未承認ユーザー

このアラートは、Salesforce アプリにアクセスし、マーケティング部門または営業部門に属していないユーザーごとにトリガーされます。アラートのペイロードにはユーザー名が含まれます。

{% code overflow="wrap" lineNumbers="true" %}

```
users during past 1d
| include web.events during past 1d
| where application.name == "Salesforce"
| compute usage_time_ = event.duration.sum()
| include session.events during past 1d
| where device.organization.entity !in ["MarketingSales"]
| compute interaction_time_ = event.user_interaction_time.sum()
```

{% endcode %}

<figure><img src="https://3549141153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeLm8O7QKZDn6z806e7Sv%2Fuploads%2Fgit-blob-5e04f4c34f2276b5f35fb6a7b69ce85a0c9b933e%2Fimage-20231017-091858.png?alt=media&amp;token=8e33dfff-cc25-4f65-88c2-6cb0866038c2" alt=""><figcaption></figcaption></figure>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nexthink.com/platform/platform/ja/user-guide/alerts-and-diagnostics/setting-up-and-managing-monitors/creating-custom-monitors/detecting-issues-impacting-a-single-device-or-user.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
