Hello, I already made a post however things have changed a lot since then and I thought that it would be best to just make a new one since I know exactly what the issue is.
Original post: JSON Extractor stops messages from showing up in input - #7 by cesq
So I have an Input that receives nginx access logs in the JSON format and whenever I add an extractor (that works correct in the preview), the messages stop coming in. Here’s a sample message that fails to extract:
{
"timestamp":"1658474614.043",
"remote_addr":"x.x.x.x.x",
"body_bytes_sent":229221,
"request_time":0.005,
"response_status":200,
"request":"GET /foo/bar/1999/09/sth.jpeg HTTP/2.0",
"request_method":"GET",
"host":"www…somesite.com",
"upstream_cache_status":"",
"upstream_addr":"x.x.x.x.x:xxx",
"http_x_forwarded_for":"",
"http_referrer":"https:://www.somesite.com/foo/bar/woo/boo/moo",
"http_user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36",
"http_version":"HTTP/2.0",
"nginx_access":true
}
I have reviewed the server logs located in /var/log/graylog-server/
and found the following error:
2022-07-25209:4-:47.146+02:00 ERROR [MessagesAdapterES7] Failed to index [1] messages. Please check the index error log in your web interface for the reason. Error: failure in bulk execution: [255]: index [graylog_313], type [_doc], id [1324e361-0bee-lled-be39-0050568fbcc4], message [ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=failed to parse field [DateTime] of type [date] in document with id '1324e361-0bee-lled-be39-0050568fbcc4'. Preview of field's value: 'DateTime']]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=failed to parse date field [DateTime] with format [ strict date optional_timeHepoch_millis]]]; nested: ElasticsearchException[Elasticsearch exception [type=date_time_parse_exception, reason=Failed to parse with all enclosed parsers]];] - - --:47.146+02:00
So I have concluded that the error lies somewhere in the way it is parsing the [DateTime] field. However this is as far as I could get. I’ve been researching this error a lot and getting nowhere. I’ve seen people with similiar issues, but sadly I just can’t tackle this one. I kindly ask for your help!
Graylog version: 4.2.10+37fbc90
OS: Red Hat Linux (kernel 4.18)