jobec / powershell-prom-client

Prometheus instrumentation library for Powershell applications
BSD 2-Clause "Simplified" License
29 stars 10 forks source link

Unexpected end of input steam #4

Open dh1656 opened 1 year ago

dh1656 commented 1 year ago

When trying to pull data presented with this module with Telegraf, we receive the following error: [inputs.prometheus] Error in plugin: error reading metrics for http://localhost:9191/metrics: reading text format failed: text format parsing error in line 20: unexpected end of input stream It seems like it might be related to Telegraf issue 10608. Would you mind taking a look at this to see if our suspicions are correct?

dh1656 commented 1 year ago

Confirmed that the error response from Telegraf was cause by the lack of a new line at the end of the collector data. I was able to resolve this by updating line 92 to add a new line after combining the metrics:

return (($Lines -join "`n")+"`n")
DennisL68 commented 1 year ago

When will this fix be released to PSGallery - PrometheusExporter?