[
https://issues.apache.org/jira/browse/SOLR-16137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Pugh resolved SOLR-16137.
------------------------------
Resolution: Fixed
Going to mark this as fixed based on [~mlbiscoc] comment. Please reopen this
if you are seeing issues in the latest version of Solr post our OpenTelementry
migration.
> prometheus_exporter configuration generates duplicated values for 1 metric
> --------------------------------------------------------------------------
>
> Key: SOLR-16137
> URL: https://issues.apache.org/jira/browse/SOLR-16137
> Project: Solr
> Issue Type: Bug
> Components: contrib - prometheus-exporter
> Affects Versions: 8.11.1
> Reporter: César Fuentes
> Priority: Minor
> Labels: configuration, metrics, prometheus
>
> The prometheus-exporter comes with a default configuration in the file
> `solr_exporter_config.xml`. It seems that the `jq` configuration to parse
> metrics from Solr to Prometheus has a small bug for one metric:
> In the selection done for `solr_metrics_core_requests_total`, the condition
> assumes that there will be 1 result, but there are actually 3 because there
> are these paths in the JSON (for a given core):
> {code:java}
> "QUERY./select.requestTimes"
> "QUERY./select.local.requestTimes"
> "QUERY./select.distrib.requestTimes"{code}
> and the selection is done like:
> {code:java}
> $jq:core(requests_total, select(.key | endswith(".requestTimes")) | select
> (.value | type == "object"), count) {code}
> The generated Prometheus metrics have the same name and set of labels, thus
> they are identical for Prometheus and trigger a "duplicated metric" error
> further in the processing.
>
> A simple solution is to fix the select condition, like:
> {code:java}
> $jq:core(requests_total, select(.key | endswith(".requestTimes") and
> (contains(".local.") or contains(".distrib.") | not)) | select (.value | type
> == "object"), count) {code}
> (assuming that we want the _total_ requestTimes count).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]