graylog-labs / graylog-plugin-mqtt

MQTT Input Plugin for Graylog

Home Page:https://www.graylog.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible version in-compatibility problem?

claudyus opened this issue · comments

Using graylog 3.0.0-alpha.1+83bd3b5 (inside docker image) and the graylog-plugin-mqtt v. 1.1.1 I have the error below while subscribe topic "#" of the mqtt broker that I would like to index.

Is it a version in-compatibility problem?
Thanks

graylog_1        | 2018-07-10 21:27:42,619 WARN : org.graylog2.inputs.codecs.GelfCodec - GELF message <1450d2e0-8488-11e8-9ad4-0242ac120005> is missing mandatory "host" field.
graylog_1        | 2018-07-10 21:27:42,623 ERROR: org.graylog2.shared.buffers.processors.DecodingProcessor - Unable to decode raw message RawMessage{id=1450d2e0-8488-11e8-9ad4-0242ac120005, journalOffset=9122, codec=gelf, payloadSize=163, timestamp=2018-07-10T21:27:42.606Z} on input <5b451665adbe1d000169a345>.
graylog_1        | 2018-07-10 21:27:42,623 ERROR: org.graylog2.shared.buffers.processors.DecodingProcessor - Error processing message RawMessage{id=1450d2e0-8488-11e8-9ad4-0242ac120005, journalOffset=9122, codec=gelf, payloadSize=163, timestamp=2018-07-10T21:27:42.606Z}
graylog_1        | java.lang.IllegalArgumentException: GELF message <1450d2e0-8488-11e8-9ad4-0242ac120005> is missing mandatory "short_message" or "message" field.
graylog_1        | 	at org.graylog2.inputs.codecs.GelfCodec.validateGELFMessage(GelfCodec.java:262) ~[graylog.jar:?]
graylog_1        | 	at org.graylog2.inputs.codecs.GelfCodec.decode(GelfCodec.java:134) ~[graylog.jar:?]
graylog_1        | 	at org.graylog2.shared.buffers.processors.DecodingProcessor.processMessage(DecodingProcessor.java:150) ~[graylog.jar:?]
graylog_1        | 	at org.graylog2.shared.buffers.processors.DecodingProcessor.onEvent(DecodingProcessor.java:91) [graylog.jar:?]
graylog_1        | 	at org.graylog2.shared.buffers.processors.ProcessBufferProcessor.onEvent(ProcessBufferProcessor.java:74) [graylog.jar:?]
graylog_1        | 	at org.graylog2.shared.buffers.processors.ProcessBufferProcessor.onEvent(ProcessBufferProcessor.java:42) [graylog.jar:?]
graylog_1        | 	at com.lmax.disruptor.WorkProcessor.run(WorkProcessor.java:143) [graylog.jar:?]
graylog_1        | 	at com.codahale.metrics.InstrumentedThreadFactory$InstrumentedRunnable.run(InstrumentedThreadFactory.java:66) [graylog.jar:?]
graylog_1        | 	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]

@claudyus The GELF message Graylog received over the MQTT GELF input is missing the mandatory "short_message" (or as a fallback "message") field.

We are using GitHub issues for tracking bugs in Graylog itself, but this doesn't look like one. Please post this issue to our discussion forum or join the #graylog channel on freenode IRC.

Also keep in mind that Graylog 3.0.0-alpha.1 is not meant for production and that the MQTT plugin is a Graylog Labs project (see https://www.graylog.org/post/introducing-graylog-labs).

Thank you!

Thank you @joschi,
your suggestion point me on the correct path that lead me to https://jpmens.net/2014/09/24/logging-to-graylog2-with-mqtt/ that extensively explain the issues here for someone really new to Graylog like me!

@claudyus It would be great if you could try graylog-mqtt-plugin 1.2.0-rc.1 with your Graylog 2.4.x cluster and see if it works for you.

We've added two more MQTT-based inputs: one for raw/plaintext messages (basically anything that resembles a string) and one for syslog messages.

Hi @joschi,
I just tested the v1.2.0-rc.1 (on Graylog docker container 3.0.0-alpha.1+83bd3b5).
I installed your updated plugin and I was able to successfully receive "raw" text messages!

Thanks!