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-unsubscr...@lucene.apache.org

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



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

Reply via email to