Logstash filter taking. high cpu

Hi,

My logstash grok pattern taking high CPU

This is my log format
I, [2022-09-16T06:27:40.386003 #13375] INFO -- : [s45g0-e726-56y7-adcf-3382276c1a77] [user_id: xxxxxx, portfolio_id: xxxxxxx] {"method":"GET","path":"/api/v5/most.json","format":"json","controller":"V5::MostFollowedController","action":"index","status":200,"duration":3.05,"view":0.18,"db":0.0,"params":{"v":"1.204.6"},"exception":null,"exception_object":null,"remote_ip":"122.164.248.211","@timestamp":"2022-09-16T06:27:40.385Z","@version":"1","message":"[200] GET /api/v5/most.json (V5::MostFollowedController#index)"}

this is my grok pattern

      grok {
            match => { "message" => "%{TIMESTAMP_ISO8601:timestamp} #%{POSINT:pid}\]%{SPACE}%{LOGLEVEL:event_level} -- :%{SPACE} %{DATA:user_name} %{DATA:user_id1} %{DATA:user_id}\, %{DATA:pfid1} %{DATA:portfolioid}\] %{GREEDYDATA:json_data}" }
    }
      }

filter{
  json{
    source => "json_data"
    target => "parsed_json"
  }
 }```

can you please suggest to me why logstash taking too much cpu

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.