Name:Ollama Excessive API Requests id:1cfab663-9adc-4169-a88c-6bae29ba3c70 version:5 date:None author:Rod Soto, Nasreddine Bencherchali, Splunk status:production type:Anomaly Description: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. Data_source:
-Ollama Server
search:`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>[^\"]+)\""
| 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`
how_to_implement:Ingest Ollama logs via Splunk TA-ollama add-on by configuring file monitoring inputs pointed to your Ollama server log directories (sourcetype: ollama:server), or enable HTTP Event Collector (HEC) for real-time API telemetry and prompt analytics (sourcetypes: ollama:api, ollama:prompts). CIM compatibility using the Web datamodel for standardized security detections. known_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. References: -https://github.com/rosplk/ta-ollama drilldown_searches: name:'View the detection results for - "$src$"' search:'%original_detection_search%
| search src="$src$"' earliest_offset:'$info_min_time$' latest_offset:'$info_max_time$' name:'View risk events for the last 7 days for - "$src$"' search:'from datamodel Risk.All_Risk
| search normalized_risk_object IN ("$src$")
| stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`' earliest_offset:'7d' latest_offset:'0' analytic_story:['Suspicious Ollama Activities']