Graylog2 / Graylog2/graylog2-server

"level" type is not checked

Open
#3,545 2 comments 0 reactions 0 assignees View on GitHub
bug processing triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

With (at least) a kafka source, it's possible to send a gelf with an invalid level type. Level remains a String until ES indexation reports

`MapperParsingException[failed to parse [level]]; nested: NumberFormatException[For input string: "info"];`

## Expected Behavior
If level given is not a number, Graylog should enforce it to a default one (let say 1) and eventually add a warn field on message.

## Current Behavior

You can declare a level in String format.

## Possible Solution
As Gelf have some type conditions, Graylog should control/check/enforce them.

## Steps to Reproduce (for bugs)

Send such kind of message:

{"message":"provisionningXXX","host":"exemple.org","level":"info","version":"1.1","timestamp":1.487951067E9}

## Your Environment

* Graylog Version: 2.1.3 (kafka input)
* Elasticsearch Version: 2.4.4
* MongoDB Version: 3.2.7

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.