Is logstash supports multiple grok pattern?

filter {
grok {
match => { "message" => [
"%{TIMESTAMP_ISO8601:timestamp} [%{LOGLEVEL:loglevel}] %{GREEDYDATA:message}",

  "\[%{LOGLEVEL:log_level}\] System Metrics: CPU %{NUMBER:cpu_usage}%\, Memory %{NUMBER:memory_usage}%\, Disk %{NUMBER:disk_usage}%\, Network In %{NUMBER:network_in} Mbps\, Out %{NUMBER:network_out} Mbps \| App Metrics: Requests %{NUMBER:request_time}\, Avg Response %{NUMBER:avg_response_time}ms\, Errors %{NUMBER:error_rate}%"

]}

}
}

here this is the configuration is my logstash , because my logs contain multiple grok pattern so verify this should be correct or not ?

like this

Hi @abhishekacharya828

Yes, Logstash grok filter plugin support multiple pattern to parse data.

Thanks

1 Like

Just need to follow available options that logstash provided to you.
for example:

Thanks

1 Like