influxdata / influxdb-relay

Service to replicate InfluxDB data for high availability
MIT License
855 stars 350 forks source link

Error parsing packet in relay : unable to parse #29

Closed smeapng closed 8 years ago

smeapng commented 8 years ago

Hello,

I am sanding them metric since collectd on UDP directly on the relay influxDB and I have this message when I run the relay:


/usr/local/go/bin/influxdb-relay -config relay.toml 
2016/06/10 16:11:50 starting relays...
2016/06/10 16:11:50 Starting HTTP relay "example-http" on 127.0.0.1:9096
2016/06/10 16:11:50 Starting UDP relay "influxdb-udp" on 0.0.0.0:25826
2016/06/10 16:11:50 Error parsing packet in relay "influxdb-udp" from 127.0.0.1:35398: unable to parse 'host1.local
                                                                                                                             ֲ����9  
                                                                                                                                        �interface eth0if_octets
                                                                                                                                                                          ֲ����if_errors
�      eth1if_octetsy��+��                                                                                                                                                           ֲ��
                                  ֲ����]if_errors
                                                      ֲ�����   diskvdadisk_octets��)t
disk_opsZLm�                                                                             ֲ���    (
                ֲ����disk_time\��
                                        ֲ���ddisk_merged��
                                                                   ֲ�����
                                                                          memory
                                                                                  memory    used�\�A
buffered�5�A                                                                                     ֲ����6
              ֲ����4
                    cached���Asponge02l.btsys.local
                                                      ֲ�6��rinterface eth0if_errors
                                                                                          ֲ�6��%   eth1if_octetsVƣ����"{
                                                                                                                                    ֲ�6��Fif_errors
                                                                                                                                                        ֲ�6�u]   diskvdadisk_octets���` ��~�
                                                                                                                                                                                                   ֲ�6��Wdisk_mergedN]<�)�
                           ֲ�6��Gdisk_time�z���
disk_ops.��W���                                ֲ�6�{F
                    ֲ�6�+� load  load!q=': missing fields
unable to parse 'ףp�?ffffff�?��(\�?
                                  ֲ�6�!�
                                         memory
                                                memory  used.)�A
                                                                  ֲ�6���
                                                                        cached ��A
                                                                                    ֲ�6���    free N�A
buffered���A': invalid field format                                                                    ֲ�6�A
Here is the configuration I have in the relay:

[[http]]
name = "example-http"
bind-addr = "127.0.0.1:9096"
output = [
    { name="local1", location = "http://127.0.0.1:8086/write" },
    { name="local2", location = "http://127.0.0.1:7086/write" },
]

[[udp]]
name = "influxdb-udp"
bind-addr = "0.0.0.0:25826"
read-buffer = 0 # default
output = [
    { name="influxdb1", location="host1.local:25826", mtu=512 },
    { name="influxdb2", location="host2.local:25826", mtu=1024 },
]
I have version 5.4 of collectd and 0.13 version of influxdb (although finally the metric does not arrive until the base ...) Do you have an idea of why the relay can not parse the metric correctly sent by collectd? Thank you. Cordially.
joelegasse commented 8 years ago

The UDP endpoint for the relay only handles InfluxDB line protocol over UDP, similar to the [[udp]] service in InfluxDB (https://docs.influxdata.com/influxdb/v0.13/write_protocols/udp/).

The other inputs would be possible, and for the purposes of the relay, would ideally be implemented as a front-end input only, feeding the HTTP backend InfluxDB instances (to take advantage of the buffering logic). But for now, the relay only supports line protocol.