sensu / sensu-prometheus-collector

Collect Prometheus metrics with Sensu!
MIT License
28 stars 18 forks source link

Handle errors from ExtractSamples #15

Open fxnn opened 5 years ago

fxnn commented 5 years ago

Unfortunately, sensu-prometheus-collector doesn't handle errors occuring during expfmt.ExtractSamples. The error result is simply ignored.

In my case, there are 782 lines of metrics (seemingly in the proper format) behind an -exporter-url, but the sensu-prometheus-collector outputs nothing. I already found out that, if there was an HTTP error, there should've been an error message on the output, so I guess that the problem occurs druing parsing.