graylog-labs / gelf-rb

Ruby GELF library (Graylog Extended Log Format)
https://rubygems.org/gems/gelf
MIT License
153 stars 104 forks source link

What's wrong here? #20

Closed Govinda-Fichtner closed 10 years ago

Govinda-Fichtner commented 10 years ago

I am using the latest graylog2 server and I am using a notifier.notify!(opts) call from gelf-rb to send data to the graylog server...

The variable opts is a hash and looks like this: https://gist.github.com/anonymous/712ceb3be974ec81301d

The message that appears in the graylog2 stream looks like this this

��}lc�d�x��[Ko�6�+_��z?�� =(Z�V��%�f#�*I9��>l˩�N���C/�$�8�Ï3C�՞pAY��[�^���1!����]���G\}����'�֑װ 7 Ր=iVw��=�hC��C[�%�p�rM>W��бi�c\�� ���7���qh��f��� �k �?�W�)@�iG���ޯX'9k��Уӭ�7w����~D����Y� D��o� ���`�GI�7t��a��oIk�%�T_�a{��Z�<��["q��VT"N�ڠJ4*�ȼ5)������6X$�2 ���ρ�+��n�as��`#��frB#*4� ,��wp5�=C��ryn�=A��X��C�PX&I�qY  \y\"t�����S�fIP&a��;]t,��̡iA@q����̌�`�"����r�,��f�DT�����H�� -�$Vڿ��a��IzO+���e��; `Ad#3��426�    pc�M諜�fB�9nz���pZހH�x}aM��1m$%bM*җ�%��ـ��Eg���0�"�$u�+-������sx����J\��Zѡ�7���c�Y���C6%nep|��j )��v�� �jҐ��diT�8Iv>e�q�a�>g�G����T�r3g*ҹ,3�ԗ�ęc���ޑ�u�-f��z�Ȟ-�y��f��2��ބfa��f&���˽PK���Fw �!4�@`\8� ǀ1�I.yf&�����ө��5�;`g����:}K�!��"$�^)Q�(�u�M�=��x���[vFfE�w�K�`K���n�f�G����\���ج�    ���KC�o�ؙ��5!_����CR������3Dt䳣l�-�Ž�b��GCYS����ρ�'TAL�s�l��r�@G��p�{���k��3�#�$/��q�2�,��.��iV�YAEY�en��%IY�yfa�adE�I�zI_��4{!����u�

How can I fix this? I was expecting to see a plain text message...

lennartkoopmann commented 10 years ago

Whoop, I've never seen that before. The way you call the notifier looks okay.

Do you see anything suspicious in the graylog2-server logs when the message is processed? What Ruby version are you running? Can you try to find out how the message is looking in ElasticSearch? Would be interesting if it is already stored wrong or if it breaks somewhere on its way to your browser.

Thanks!