Closed JulioQc closed 8 years ago
@JulioQc The problem is the dynamic mapping used by Elasticsearch if no explicit mapping is available.
See http://docs.graylog.org/en/2.0/pages/configuration/elasticsearch.html#custom-index-mappings for details.
Sure it is related to that but I don't get why this would happen here. Dynamic settings are set as Strings (as I understand it) and the current problematic field is not conflicting.
@JulioQc If the ThreadID
field initially contained a numeric value, the Elasticsearch dynamic mapping expects it to stay this way.
Create a custom index mapping for your fields up-front to circumvent this problem.
Ok! Crystal clear! Forcing datatype on the Grok pattern seem to do it for now (+ of course deflector cycling). I'll look into custom index mapping since it's by design as well but that seems like lots of work with the number of input we have... Thanks for the guidance!
This issue is specifically addressed in the readme for the content pack:
https://marketplace.graylog.org/addons/b11664ca-1cf5-40bb-a3c1-d230ae9d950d
"Create an ES template to force the ThreadID field type to "String", otherwise ES may dynamically map the field type as INT which would cause indexing errors later on when an alphanumeric ThreadID comes around."
I also have included an example template to use with your ES indicies
Thanks for filling in @joschi :+1:
Yes, I notified them of the scenario
Julien L.
On Aug 10, 2016 11:29 AM, "jro" notifications@github.com wrote:
This issue is specifically addressed in the readme for the content pack:
https://marketplace.graylog.org/addons/b11664ca-1cf5-40bb- a3c1-d230ae9d950d
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Graylog2/graylog2-server/issues/2645#issuecomment-238904216, or mute the thread https://github.com/notifications/unsubscribe-auth/AHJGhEYVMTD-llQE8HDtrO3f4Gc_ANDzks5qee5fgaJpZM4JgInL .
Expected Behavior
Field is parsed as string rather then numerical.
Current Behavior
Graylog seeing string as numerical. Whole system is broken after wards.
MapperParsingException[failed to parse [ThreadID]]; nested: NumberFormatException[For input string: "0D30"];
Possible Solution
Type is correctly recognize as string and this type of error doesn't mess up the journal so bad... Force type in GROK pattern for problematic extractor: {WINDNS_THREADID:ThreadID;string}
Steps to Reproduce (for bugs)
Context
The GROK pattern for the DNS is this: [a-zA-Z0-9]{4} And from my understanding, Graylog tried to store the 0D30 field as numeric value rather then a string. I report this as a bug because it doesn't make sense for the system to see as a numerical (mistakenly seen as hex maybe?)
Your Environment