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



##########
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:
       I meant to comment on the "totalTime" metric w.r.t. it's usefulness; 
sorry for the confusion.  It's some massive number of course... it'd need to be 
divided by something else to be useful?  Also, totalTime is in nanoseconds 
lately!  https://issues.apache.org/jira/browse/SOLR-16073
   
   I understand the overarching objective of top-level vs core-level -- makes 
sense. 
   I'm a bit unclear on the distinction between the node level "$jq:node" 
metrics, and the "Local (non-distrib) query metrics", both of which are using 
".local.".
   
   RE Grafana; I haven't seen our official one in use live.  I use our 
own/custom one at work.




-- 
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