sentient / statsdbeat

A beat to get statsd udp messages into Elastic Search
Other
4 stars 4 forks source link

Failed making a beat #2

Closed CodeFreezr closed 5 years ago

CodeFreezr commented 5 years ago

We receive the following error: 2019-03-15T11:27:58.931Z ERROR [statsdbeat] beater/statsdbeat.go:71 Failed making a beat{error 25 0 Expecting 2 or 3 parts of | but was 1} 2019-03-15T11:27:58.931Z ERROR [statsdbeat] beater/statsdbeat.go:71 Failed making a beat{error 25 0 strconv.Atoi: parsing "0.0005": invalid syntax} The statsd flavor is etsy.

Any ideas?

sentient commented 5 years ago

Statsd always want to process integers. No fractions. You are sending 0.0005 but it expects an int.

sentient commented 5 years ago

It could also be that the the udp message was truncated. We do support Multi-Metric packets. But the client must make sure that it does not exceed the payload

Multi-Metric Packets StatsD supports receiving multiple metrics in a single packet by separating them with a newline.

gorets:1|c\nglork:320|ms\ngaugor:333|g\nuniques:765|s

Be careful to keep the total length of the payload within your network's MTU. There is no single good value to use, but here are some guidelines for common network scenarios:

Fast Ethernet (1432) - This is most likely for Intranets. Gigabit Ethernet (8932) - Jumbo frames can make use of this feature much more efficient. Commodity Internet (512) - If you are routing over the internet a value in this range will be reasonable. You might be able to go higher, but you are at the mercy of all the hops in your route.

DrMagPie commented 5 years ago

Hi, I got similar error. Jul 17 09:49:36 ip statsdbeat[8792]: 2019-07-17T09:49:36.312Z ERROR [statsdbeat] beater/statsdbeat.go:73 Failed making a beat{error 25 0 failed to parse the value to an int 0.008024}

I was trying to parse Consult telemetry. StatsDBeat and Consul application are on same host. so internet should not be an issue.

so i assume issue is in data that is sent by Consul could be that data sent by Consul it to big or small for converting to int? and could this be a possible fix for it? code from telegraf

sentient commented 5 years ago

The values should be an int for statsd

On Wed, Jul 17, 2019, 03:06 DrMagPie notifications@github.com wrote:

Hi, I got similar error. Jul 17 09:49:36 ip statsdbeat[8792]: 2019-07-17T09:49:36.312Z ERROR [statsdbeat] beater/statsdbeat.go:73 Failed making a beat{error 25 0 failed to parse the value to an int 0.008024}

I was trying to parse Consult telemetry. StatsDBeat and Consul application are on same host. so internet should not be an issue.

so i assume issue is in data that is sent by Consul https://www.consul.io/docs/agent/telemetry.html could be that data sent by Consul it to big or small for converting to int? and could this be a possible fix for it? code from telegraf https://github.com/influxdata/telegraf/commit/6647cfc2286f3c07142eb7439b5f6ef6b6d841d4

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/sentient/statsdbeat/issues/2?email_source=notifications&email_token=AABM2G722ABVPKFUW6AVJDTP73VLXA5CNFSM4G6ZCIUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2DWT5A#issuecomment-512190964, or mute the thread https://github.com/notifications/unsubscribe-auth/AABM2GYSVJA3CWJF2WLOYTDP73VLXANCNFSM4G6ZCIUA .

ashb commented 3 years ago

https://github.com/b/statsd_spec#metric-types--formats:

The protocol allows for both integer and floating point values.

https://github.com/jsocol/pystatsd/blob/master/statsd/client/base.py#L26-L35

And the authoritiative source - statsd itself accepts floating point values.

https://github.com/statsd/statsd/blob/2041f6fb5e64bbf779a8bcb3e9729e63fe207e2f/lib/helpers.js#L45-L48

Notice how here it checks isNumber -- and not isInteger.