Open runningman84 opened 8 years ago
Thanks a lot for your time, Might this be due to internal conversions done in rabbit? I'm also wondering if both configs are the same as the one you proposed, can you share a simplified version of it?
closing this for now until we get more data, feedback and inputs to reopen.
I am also having this issue with a similar setup. Input -> UDP. Output -> GELF. A simple float like "0.9999" in a rails application becomes "0.9999E0" in Graylog. This started happening after migration from 1.4.1 to 2.3.1. Also happens in 2.2.4 and 2.2.3. Is there a way this behaviour can be reversed?
I think this might be related to #5114 ?
I checked the above issue. It seems to me that it is not related, but I maybe wrong. The issue I am referring to over here is "forced conversion to BigDecimal" which was not the case before. I would understand if logstash truncated the last few digits, unless specified in a specific format, but to make all floats -> BigDecimal and thereby breaking the GELF output plugin from graylog, seems a bit much. That is just my opinion. I am open to any kind of fix or workaround.
@adnan-panalytics could you share your config?
input {
tcp {
host => "0.0.0.0"
port => 5229
codec => json_lines
}
}
input {
udp {
host => "0.0.0.0"
port => 5228
codec => json_lines
add_field => { "short_message" => "" }
}
}
output {
gelf {
chunksize => 1420
host => '127.0.0.1'
level => "INFO"
port => 12201
sender => "%{@host}"
short_message => ""
full_message => ""
}
}
input {
sqs {
access_key_id => "xxx"
secret_access_key => "yyyy"
region => "eu-west-1"
queue => "kapow_logging"
}
}
filter {
date {
match => [ "kapow_timestamp", "YYYY-MM-dd HH:mm:ss" ]
add_field => { "ts_kapow" => "added"}
}
}
@pschrammel would you mind providing some explanations/details about this config?
@colinsurprenant: Our config is pretty similar -
Do let me know, if anything else is unclear.
I am experiencing this issue also and I think I can say with some certainty that issue lies in the gelf output.
input {
gelf {
port => 12201
}
}
output {
http {
headers => {"X-Insert-Key" => "***REMOVED KEY***"}
content_type => "application/json"
http_method => "post"
url => "***REMOVED NEWRELIC INSIGHTS URL***"
}
gelf {
host => "graylog_host"
}
}
The data that is sent to new relic is a floating point number but data sent to graylog is a string like "0.2618057E1".
Prior to using logstash I was sending data to graylog directly and graylog accepted the data as floating point.
I hope this helps.
You may be right, but from what I have found out, the gelf output plugin code is quite simple and straightforward. When you have a look at the code, nowhere do you find the conversion to bigdecimal (Also there have been no commits that seem have made this kind of change). But, when you look at the logstash codebase, there have been commits which change this behaviour and that is the reason I think that it needs to be fixed from logstash. Because the plugin was working with the previous versions of logstash, but doesn't with the latest ones (even though the plugin has not been changed all that much).
@suyograo Does it need any more information? I am happy to provide anything else required, if this bug can be fixed. As this has lead to us abandoning floating point numbers and use workarounds for it.
@purbon Could you please re-open this issue?
I have two setups parsing sensu messages.
filebeat -> logstash1 -> gelf (Graylog) filebeat -> logstash1 -> rabbitmq <- logstash2 -> gelf (Graylog)
In the second setup the data type of a float value is represented as "0.363E0" in Graylog. In the first setup it is stored as 0.363.
The logstash2 instance is quite simple there is no filtering at all just, input rabbitmq output gelf.
The logstash1 instance parses sensu messages lile this using the json filter
My filter config looks like this
Why is the data type changed here?