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).