ウェブフック NQL 条件の設定
WebhookのNQL条件フィールドに以下を使用してクエリを書く:
WebhooksでサポートされているNQLオペレーター。
WebhooksでサポートされているNQLテーブル
WebhooksでサポートされているNQLテーブルの形式は<namespace>.<table>
です。。
サポートされていないNQLオブジェクトがNQL条件フィールドに含まれていると、有効な構文であってもシステムはWebhook設定の保存時にエラーメッセージを表示します。
alert.alerts
campaign.responses
execution.crashes
device_performance.boots
device_performance.system_crashes
device_performance.hard_resets
remote_action.executions
セッション
web.events
web.errors
web.page_views
web.transactions
workflow.executions
WebhooksでサポートされているNQLプロパティ
Webhook設定ページのNQL条件フィールドでクエリを書いているとき、システムは上記のNQLオブジェクトからサポートされているNQLプロパティを表示します。 下の画像を参照。

WebhooksでサポートされているNQLオペレーター
すべてのNQLオペレーターが顧客に提供されるわけではありません。 特定の条件で使用する際は、次のNQLオペレーターのサブセットを使用してください。
where
選択
Oui
Non
list
射影
Oui
はい、少なくとも1回。
and
フィルタリング
Oui
Non
or
フィルタリング
Oui
Non
含む
フィルタリング
Oui
Non
in
フィルタリング
Oui
Non
You must add every NQL field you use as a placeholder in the webhook Resource or Payload to the list
clause.
プレースホルダーを使用しない場合でも、少なくとも1つのNQLフィールドをlist
句に追加する必要があります。
アラート関連Webhookの有効なNQL条件例
以下の有効なNQLクエリの例の一部は、事前に関連するalerts
を定義していることを前提としています。 詳細は、アラートの開始の文書を参照してください。
有効なNQL例1 - モニター名「(…)」がアラートをトリガーし、特定のウェブアプリケーションの条件が満たされるとWebhookをトリガーする。
alert.alerts
| where monitor.tags contains "web-applications"
| where alert.context contains "*Salesforce*" or alert.context contains "*Microsoft*"
| list alert.monitor.name, alert.status, monitor.tags, alert.context, trigger_time, recovery_time, alert.monitor.thresholds, monitor.priority, alert.trigger_values, alert.trigger_reference_value, alert.recovery_values, alert.context, device_view_link , issue_view_link
有効なNQL例2 - スクウェアバッグした「最後の24時間にMS Teamsがクラッシュ」モニターがアラートをトリガーする場合はWebhookをトリガーします。
alert.alerts
| where monitor.nql_id == "#ms_teams_crashes_in_the_last_24_hours"
| list alert.context
有効なNQL例3 - high
プライオリティのモニターがアラートをトリガーする場合はWebhookをトリガーします。
alert.alerts
| where monitor.priority == high
| list alert.context
有効なNQL例4 - モニター名「最後の24時間のMS Teamsのクラッシュ」
または「コンピュータのビデオ品質が悪い」
でアラートをトリガーするとWebhookをトリガーします。
alert.alerts
| where monitor.name == "MS Teams crashes in the last 24 hours" or monitor.name == "Poor video quality for computers"
| list alert.context
有効なNQL例5 - high
プライオリティまたはモニター名前「SD用MS Teamsのクラッシュ」
、およびタグ「servicenow」
を含むモニターがアラートをトリガーする場合、Webhookをトリガーします。
alert.alerts
| where monitor.priority == high or monitor.name == "MS Teams crashes for SD" and monitor.tags contains "servicenow"
| list alert.context
Webhook用の他の有効なNQL条件例
有効なNQL例6 - fast_startup
に対して等しいデバイスブートをフィルタリングし、かつ200秒以上の持続時間がある場合。
device_performance.boots
| where type == fast_startup and duration > 200s
| list device_performance.boot.type, device_performance.boot.duration
有効なNQL例7 - タイムアウト状況を指すエラーコード335
または49
によるデバイスクラッシュをフィルタリングする。
device_performance.system_crashes
| where error_code == 335 or error_code == 49 and label in ["TIMEOUT"]
| list device_performance.system_crash.error_code
有効なNQL例8 - 開始直後に5回以上クラッシュしたバイナリzoom.exe
のすべての実行クラッシュをフィルタリングします。
execution.crashes
| where binary_path in ["zoom.exe"] and number_of_crashes >= 5 and crash_on_start == true
| list execution.crash.number_of_crashes
有効なNQL例9 - nql_id
およびステータスが[expired , failure , cancelled ]
でないものによりリモートアクションをフィルタリングします。
remote_action.executions
| where remote_action.nql_id == "#update_binary" and status in [expired , failure , cancelled ]
| list remote_action.execution.outputs
有効なNQL例10 - 特定のキャンペーンの回答、状態、詳細を一覧表示します。
campaign.responses
| where campaign.name == "campaign name"
| list answers , state , state_details
Webhookの無効なNQL条件やよくあるミス
以下の無効なNQLクエリの例の一部は、事前に関連するalerts
を定義していることを前提としています。 詳細は、アラートの開始の文書を参照してください。
無効なNQL例1 - サポートされていないNQLテーブル、list
オペレーターの欠如、in
オペレーターの誤った活用。
device_performance.system_crashes
| where error_code == 335 or error_code == 49 and label in [*TIMEOUT*]
無効なNQL例2 - 利用できないプロパティとin
オペレーターの誤った使用。
alert.alerts
| where trigger_time == "2021-10-23" and monitor.tags in ["*Logitech*"]
| list alert.context
無効なNQL例3 - 利用できないオペレーター。
devices
| with alert.alerts during past 7d
| summarize c1 = count() by sid
無効なNQL例4 - サポートされていないNQLテーブル。
devices
| where device.operating_system.platform == Windows
| list device.name
無効なNQL例5 - サポートされていないNQLオペレーター。
devices
| with execution.crashes
| summarize count=count() by operating_system.name
無効なNQL例6 - 列挙型を比較する際の誤った値。
device_performance.BoOTS | where type == FULLboot
device_PErformance.BoOTS | where type == FULLboot
device_PErformance.BoOTS | where TyPe == FULLboot
device_performance . boots | where type == FullbooT
関連トピック
Last updated
Was this helpful?