powershell-prom-client icon indicating copy to clipboard operation
powershell-prom-client copied to clipboard

Unexpected end of input steam

Open dh1656 opened this issue 1 year ago • 2 comments

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 avatar Mar 10 '23 21:03 dh1656

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")

dh1656 avatar Mar 10 '23 22:03 dh1656

When will this fix be released to PSGallery - PrometheusExporter?

DennisL68 avatar May 24 '23 10:05 DennisL68