from logs-azure_openai.logs-*
| where
azure.open_ai.properties.response_length == 0 and
azure.open_ai.result_signature == "200" and
azure.open_ai.operation_name == "ChatCompletions_Create"
| keep
azure.open_ai.properties.request_length,
azure.open_ai.result_signature,
cloud.account.id,
azure.resource.name
| stats
Esql.event_count = count(*)
by
azure.resource.name
| where
Esql.event_count >= 10
| sort
Esql.event_count desc
Install detection rules in Elastic Security
Detect Azure OpenAI Insecure Output Handling in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).