Hello all
Tell me how to configure correctly PHP errors with Stack trace in multiline.
I have such messages
1 message ) [05-Jun-2020 11:35:39 Europe/Kiev] PHP Fatal error: require(): Failed opening required 'askldjalksnas' (include_path='.:/usr/local/lib/php') in /srv/src/myproject/sites/workfolder/121/error.php on line 3
2 message )
[05-Jun-2020 11:35:39 Europe/Kiev] PHP Stack trace:
3 message )
[05-Jun-2020 11:35:39 Europe/Kiev] PHP 1. {main}() /srv/src/myproject/sites/workfolder/121/error.php:0
But I want to connect these messages
my settings:
Input
gelf {
port_udp => 14223
tags => naf1_php
use_udp => true
type => naf1_php
host => "0.0.0.0"
codec => multiline {
pattern => "(.+PHP Stack trace: .+)"
negate => true
what => "previous"
}
}
filter
grok {
match => [ "message", "[%{MONTHDAY:day}-%{MONTH:month}-%{YEAR:year} %{TIME:time} %{WORD:zone}/%{WORD:country}] PHP %{DATA:error_level}: %{GREEDYDATA:error}" ]
add_field => { "timestamp" => "%{day}-%{month}-%{year} %{time} %{zone}/%{country}" }
add_tag => [ "%{level}" ]
remove_field => [ "day", "month", "year", "time", "zone", "country" ]
}
But it doesn 't work
I tried to change pattern on "(.+PHP Stack trace: .+)" But it didn 't help too