First of all, excuse my english.
The raw message from nginx:
somehost nginx: 220.127.116.11 | 192.168.1.3:7777 | 28/Jul/2019:20:28:44 +0300 | POST /v1/edited.set HTTP/2.0 | 200 | 200 | RU | 0.027 | 0.028 | somehost.android/1.12.1 (Redmi 5 Plus; Android 7.1.2) | - | https | ge67a7k7keps931rqglok1i3123a4o | -
There is we see value “0.028” - it’s $upstream_response_time .
Sometimes this field has value “-”.
I need to convert $upstream_response_time value to numeric. To avoid errors in /var/log/elasticsearch/graylog.log, I wrote a condition:
- Only attempt extraction if field matches regular expression -
But anyway I have a lot of errors like this:
org.elasticsearch.index.mapper.MapperParsingException: failed to parse field [b_time] of type [float] in document with id ‘b8b3bce1-b15e-11e9-a11a-002590a78074’
Caused by: java.lang.NumberFormatException: For input string: “-”
Regular expression above doesn’t include value “-”, why extractor tried to proceed this message?
Could somebody help me? It is a bug or i did something wrong?