You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been attempting to read in the metrics exposed by Tessera at the endpoint /metrics using the follow Telegraf filter:
[[inputs.prometheus]]
name_override = "tessera"
urls = [
# this is a running, healthy tessera container
"http://localhost:9000/metrics"
]
# this has been tried with both metric_version 2 and 1
metric_version = 2
response_timeout = "5s"
This results in the following error:
[inputs.prometheus] Error in plugin: error reading metrics for http://localhost:9000/metrics: reading text format failed: text format parsing error in line 280: unexpected end of input stream
I had a quick peek at the output via curl, while also counting line numbers:
If you run the curl without piping into less you'll notice the return does not end in a newline. I thought this was strange and decided to test a local echo-server with two metrics, one ending in a newline and one without. I used this Javascript:
The Telegraf filter now correctly processes the /metrics-fixed endpoint and fails as expected via the /metrics endpoint. This leads me to believe Tessera is missing a required newline at the end of the response to it's /metrics endpoint.
I am not an expert on Prometheus or Telegraf.
I've been attempting to read in the metrics exposed by Tessera at the endpoint
/metrics
using the follow Telegraf filter:This results in the following error:
I had a quick peek at the output via curl, while also counting line numbers:
The last two lines are:
If you run the curl without piping into less you'll notice the return does not end in a newline. I thought this was strange and decided to test a local echo-server with two metrics, one ending in a newline and one without. I used this Javascript:
The Telegraf filter now correctly processes the
/metrics-fixed
endpoint and fails as expected via the/metrics
endpoint. This leads me to believe Tessera is missing a required newline at the end of the response to it's/metrics
endpoint.The spec for Prometheus formatting also states newline endings here: https://prometheus.io/docs/instrumenting/exposition_formats/
I don't do Java but somewhere here https://github.com/ConsenSys/tessera/blob/47ecb17dadd1e2b8e649c9de7408959c03cdeb8a/server/jersey-server/src/main/java/com/quorum/tessera/server/monitoring/MetricsResource.java#L42 a newline is being dropped even though it's present in the PrometheusProtocolFormatter and on line 37 of the linked code too.
The text was updated successfully, but these errors were encountered: