You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Naoto Minami (Jira)" <ji...@apache.org> on 2023/01/29 05:46:00 UTC

[jira] [Commented] (SOLR-16639) solr-exporter metrics node_thread_pool_completed_total occurs jq parse error

    [ https://issues.apache.org/jira/browse/SOLR-16639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17681682#comment-17681682 ] 

Naoto Minami commented on SOLR-16639:
-------------------------------------

solr-exporter error log
{code:java}
ERROR - 2023-01-28 18:11:55.401; org.apache.solr.prometheus.scraper.SolrScraper; Error apply JSON query=(.metrics["solr.node"] | to_entries | .[] | select((.key | contains(".threadPool."))) | select((.key | endswith(".completed"))) as $object | $object.key | split(".") as $key_items | $key_items | length as $label_len | $key_items[0] as $category | if ($label_len >= 5) then $key_items[1] else "" end as $handler | if ($label_len >= 5) then $key_items[3] else $key_items[2] end as $executor | $object.value.count as $value | {("name"): "solr_metrics_node_thread_pool_completed_total",("type"): "COUNTER",("help"): "See following URL: https://solr.apache.org/guide/solr/latest/deployment-guide/metrics-reporting.html",("label_names"): [("category", "handler", "executor")],("label_values"): [($category, $handler, $executor)],("value"): $value}) to result => net.thisptr.jackson.jq.exception.JsonQueryException: Cannot index number with string "count" {code}

> solr-exporter metrics node_thread_pool_completed_total occurs jq parse error
> ----------------------------------------------------------------------------
>
>                 Key: SOLR-16639
>                 URL: https://issues.apache.org/jira/browse/SOLR-16639
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: contrib - prometheus-exporter
>    Affects Versions: main (10.0)
>            Reporter: Naoto Minami
>            Priority: Major
>              Labels: SolrCloud
>
> jq expr `select(.key | endswith(".completed"))` matches "*.tasks.completed" too. But the format of "*.tasks.completed" metrics is like bellow:
> "QUERY.httpShardHandler.threadPool.httpShardExecutor.tasks.completed":16,
> [https://github.com/apache/solr/blob/bf490f16b5e1acbbd4b01ec3aa1e5b035096716a/solr/prometheus-exporter/conf/solr-exporter-config.xml#L541]
> So, $object.value.count jq expr occurs jq parse error. I will fix this problem to add `select(.value | type=="object")` filter to jq expr.
>  
> Note:
> I uses solr-exporter with -z parameter (as SolrCloud mode)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org