travelping / exometer_influxdb

Exometer reporter for InfluxDB
Mozilla Public License 2.0
36 stars 31 forks source link

InfluxDB reporter UDP sending error: {error,emsgsize} #51

Closed vassilevsky closed 5 years ago

vassilevsky commented 5 years ago

Hi 🙃 Getting this error. The config is:

{exometer, [
    {report, [
        {reporters, [
            {exometer_report_lager, [
                {level, notice},
                {type_map, [{'_',integer}]}
            ]},
            {exometer_report_influxdb, [
                {protocol, udp},
                {host, <<"localhost">>},
                {port, 5268},
                {username, <<"influxdb">>},
                {password, <<"influxdb">>},
                {db, <<"our_app__staging">>},
                {timestamping, {true, ms}},
                {batch_window_size, 100},
                {tags, []}
            ]}
        ]}
    ]}
]},

I'm guessing that the app sometimes generates a burst of metrics, and in 100 ms they are accumulating into a packet that is larger than 65536 bytes (loopback interface MTU).

Could you add | Would you accept a PR with cutting metrics by max UDP packet size?

mgumz commented 5 years ago

We accept anything that fixes a problem :)

vassilevsky commented 5 years ago

Thank you :3