Splunk

Ollama Excessive API Requests

Last updated 2 days ago on 2026-11-21

About

Detects high Ollama API request volumes from a single client in a short time window. A burst may indicate automated abuse or contribute to resource contention, but GIN access logs do not establish malicious intent or service impact; validate the client and workload against local usage baselines.
Platform
Splunk
Tags
Data Source: SplunkDomain: ApplicationRule Type: QueryOS: Any
Severity
medium
Risk Score
47
References
https://github.com/rosplk/ta-ollama(external, opens in a new tab or window)
False Positives
Legitimate automated services (CI/CD pipelines, monitoring tools, batch jobs), multiple users behind NAT/proxy infrastructure, or authorized load testing activities may trigger this detection during normal operations. Operator must adjust threshold accordingly.
Source
View on GitHub(external, opens in a new tab or window)

Definition

Rule Language
SPL
Rule Type
query
text code block:
`ollama_server` "[GIN]" | rex field=_raw "\|\s+(?<raw_status>\d+)\s+\|\s+(?<raw_latency>[\d\.]+(?:µs|ms|s))\s+\|\s+(?<raw_src>[^|]+?)\s+\|\s+(?<raw_method>\w+)\s+\"(?<raw_path>[^\"]+)\"" | eval src=coalesce(src, trim(raw_src)) | eval uri_path=coalesce(uri_path, raw_path) | eval http_method=coalesce(http_method, raw_method) | eval http_response_code=coalesce(http_response_code, raw_status) | eval response_time_ms=coalesce(response_time_ms, case(match(raw_latency, "µs$"), tonumber(replace(raw_latency, "µs", ""))/1000, match(raw_latency, "ms$"), tonumber(replace(raw_latency, "ms", "")), match(raw_latency, "s$"), tonumber(replace(raw_latency, "s", ""))*1000)) | where isnotnull(src) | bin _time span=5m | stats count as request_count dc(uri_path) as distinct_endpoints values(uri_path) as endpoints by _time src | where request_count > 120 | eval severity="medium" | eval attack_type="High Volume API Activity" | `ollama_excessive_api_requests_filter`

View this rule on Splunk

This rule was sourced from the official Splunk public repository. View the original rule on GitHub(external, opens in a new tab or window).