ovh / beamium

Prometheus to Warp10 metrics forwarder
Other
84 stars 21 forks source link

error when prometheus value is nan #89

Closed tduboys closed 5 years ago

tduboys commented 5 years ago

Prometheus can export a « nan » value, but needs to be skipped by beamium before forwarding to warp10 metrics.

Example : NTP Collectd plugin can expose a NaN value for local dispersion

collectd_ntpd_time_dispersion{ntpd="LOCAL-0",instance="localhost"} nan 1546875564231

Beamium converts to sinks file :

1546875564231000// collectd_ntpd_time_dispersion{server_type=ntp,host=localhost,ntpd=LOCAL-0,instance=localhost} nan

But Warp10 metrics drops the file with error : 

< HTTP/1.1 500 Parse error at '1546875564231000// collectd_ntpd_time_dispersion{server_type=ntp,host=localhost,ntpd=LOCAL-0,instance=localhost} nan'

Expected comportment : If Warp10 dont allow NaN value, beamium needs to skip it.

tduboys commented 5 years ago

PR #90 fix the issue correctly