Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics Parsing Error with Prometheus Input Plugin for Telegraf #1161

Closed
zandbelt opened this issue Jan 17, 2024 Discussed in #1160 · 0 comments
Closed

Metrics Parsing Error with Prometheus Input Plugin for Telegraf #1161

zandbelt opened this issue Jan 17, 2024 Discussed in #1160 · 0 comments

Comments

@zandbelt
Copy link
Member

Discussed in #1160

Originally posted by studersi January 17, 2024
We are attempting to integrate the metrics information introduced in mod_auth_openidc 2.4.15 into our monitoring setup.

We are using the Prometheus Input Plugin for Telegraf to collect the metrics.

Fetching the metrics appears to work as expected and the metrics are returned. However, there appears to be a parsing issue:
Telegraf log:

2024-01-17T09:19:19Z E! [inputs.prometheus] Error in plugin: error reading metrics for "https://123.123.123.123/oidc-metrics?format=prometheus&reset=true": reading text format failed: text format parsing error in line 9: second HELP line for metric name "example_com_authtype"

It looks like the response from mod_auth_openidc does not comply with the specification: https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md#comments-help-text-and-type-information.

Only one HELP line may exist for any given metric name.
Only one TYPE line may exist for a given metric name.

For example, the following output provides two HELP and TYPE lines for the metric example_com_authtype:

# HELP example_com_authtype The number of requests handled by mod_auth_openidc.
# TYPE example_com_authtype counter
example_com_authtype{handler="mod_auth_openidc"} 0

# HELP example_com_authtype The number of requests handled by AuthType openid-connect.
# TYPE example_com_authtype counter
example_com_authtype{handler="openid-connect"} 0

Other metrics do not appear to have this issue. For example, there is only one HELP and TYPE line for example_com_provider_metadata_bucket:

# HELP example_com_provider_metadata A histogram of provider discovery document requests.
# TYPE example_com_provider_metadata histogram
example_com_provider_metadata_bucket{le="0.1"} 0
example_com_provider_metadata_bucket{le="0.5"} 0
example_com_provider_metadata_bucket{le="1"} 0
example_com_provider_metadata_bucket{le="5"} 0
example_com_provider_metadata_bucket{le="10"} 0
example_com_provider_metadata_bucket{le="50"} 0
example_com_provider_metadata_bucket{le="100"} 0
example_com_provider_metadata_bucket{le="500"} 0
example_com_provider_metadata_bucket{le="1000"} 0
example_com_provider_metadata_bucket{le="5000"} 0
example_com_provider_metadata_bucket{le="+Inf"} 0
example_com_provider_metadata_sum 0
example_com_provider_metadata_count 0

Should these two example_com_authtype metrics be documented only once or are these separate metrics that should be named differently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant