You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/03/03 05:06:10 UTC

[GitHub] [lucene-solr] dsmiley commented on a change in pull request #2165: SOLR-15059: Improve query performance monitoring

dsmiley commented on a change in pull request #2165:
URL: https://github.com/apache/lucene-solr/pull/2165#discussion_r818317522



##########
File path: solr/contrib/prometheus-exporter/conf/solr-exporter-config.xml
##########
@@ -315,88 +477,22 @@
             node metrics
           -->
           <str>
-            .metrics["solr.node"] | to_entries | .[] | select(.key | endswith(".clientErrors")) as $object |
-            $object.key | split(".")[0] as $category |
-            $object.key | split(".")[1] as $handler |
-            $object.value.count as $value |
-            {
-              name         : "solr_metrics_node_client_errors_total",
-              type         : "COUNTER",
-              help         : "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
-              label_names  : ["category", "handler"],
-              label_values : [$category, $handler],
-              value        : $value
-            }
+            $jq:node(client_errors_total, select(.key | endswith(".clientErrors")), count)
           </str>
           <str>
-            .metrics["solr.node"] | to_entries | .[] | select(.key | endswith(".clientErrors")) as $object |
-            $object.key | split(".")[0] as $category |
-            $object.key | split(".")[1] as $handler |
-            $object.value.count as $value |
-            {
-              name         : "solr_metrics_node_errors_total",
-              type         : "COUNTER",
-              help         : "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
-              label_names  : ["category", "handler"],
-              label_values : [$category, $handler],
-              value        : $value
-            }
+            $jq:node(errors_total, select(.key | endswith(".errors")), count)
           </str>
           <str>
-            .metrics["solr.node"] | to_entries | .[] | select(.key | endswith(".requestTimes")) as $object |
-            $object.key | split(".")[0] as $category |
-            $object.key | split(".")[1] as $handler |
-            $object.value.count as $value |
-            {
-              name         : "solr_metrics_node_requests_total",
-              type         : "COUNTER",
-              help         : "See following URL: https://lucene.apache.org/solr/guide/metrics-reporting.html",
-              label_names  : ["category", "handler"],
-              label_values : [$category, $handler],
-              value        : $value
-            }
+            $jq:node(requests_total, select(.key | endswith(".local.requestTimes")), count)

Review comment:
       @thelabdude I noticed here you added a ".local." when it wasn't there before.  Why?  And for that matter, maybe we needn't bother publishing this particular metric at all; I'm skeptical of the utility.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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