text code block:from logs-gcp_vertexai.auditlogs-* | where data_stream.dataset == "gcp_vertexai.auditlogs" and source.ip is not null and ( event.action like "*PredictionService.GenerateContent*" or event.action like "*PredictionService.StreamGenerateContent*" ) and (gcp.vertexai.audit.status.code is null or gcp.vertexai.audit.status.code == 0) | stats Esql.event_count = count(*), Esql.timestamp_first_seen = min(@timestamp), Esql.timestamp_last_seen = max(@timestamp), Esql.event_action_values = values(event.action) by source.ip, gcp.vertexai.audit.resource_name, cloud.project.id | where Esql.event_count >= 100 | keep source.ip, gcp.vertexai.audit.resource_name, cloud.project.id, Esql.event_count, Esql.timestamp_first_seen, Esql.timestamp_last_seen, Esql.event_action_values
Install detection rules in Elastic Security
Detect GCP Vertex AI High GenerateContent Volume From Single IP 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(external, opens in a new tab or window).