This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new c5927d9c68d SOLR-15083: prometheus-exporter incorrect metric namings 
(#1588)
c5927d9c68d is described below

commit c5927d9c68dfaddce7690615b1a8f4f3d9277bb1
Author: Matthew Biscocho <[email protected]>
AuthorDate: Thu Apr 27 03:34:47 2023 -0400

    SOLR-15083: prometheus-exporter incorrect metric namings (#1588)
---
 solr/CHANGES.txt                                                    | 2 ++
 solr/prometheus-exporter/conf/grafana-solr-dashboard.json           | 6 +++---
 solr/prometheus-exporter/conf/solr-exporter-config.xml              | 6 +++---
 .../modules/deployment-guide/pages/metrics-reporting.adoc           | 2 +-
 .../deployment-guide/pages/performance-statistics-reference.adoc    | 2 +-
 5 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 9bf324b4891..5ad7050aad5 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -111,6 +111,8 @@ Bug Fixes
 * SOLR-16747: The Solr source release can now be built/checked using gradle.
   The solr-ref-guide tasks will not be included by default if the root 
directory is not a github repository. (Houston Putman)
 
+* SOLR-15083: Fix default solr-exporter-config.xml metrics with incorrect time 
unit conversions. (Matthew Biscocho via janhoy)
+
 * SOLR-16755: bin/solr's '-noprompt' option no longer works for examples 
(hossman, janhoy, Houston Putman)
 
 * SOLR-7609: Internal update requests should fail back to the client in some 
edge cases for shard splits. Use HTTP status 510 so the client can retry the 
operation. (Alex Deparvu, David Smiley, Tomás Fernández Löbbe)
diff --git a/solr/prometheus-exporter/conf/grafana-solr-dashboard.json 
b/solr/prometheus-exporter/conf/grafana-solr-dashboard.json
index 730cd17c222..5a4db0cf377 100644
--- a/solr/prometheus-exporter/conf/grafana-solr-dashboard.json
+++ b/solr/prometheus-exporter/conf/grafana-solr-dashboard.json
@@ -3491,7 +3491,7 @@
           "datasource": "${DS_PROMETHEUS}",
           "fieldConfig": {
             "defaults": {
-              "custom": {}
+              "unit": "s"
             },
             "overrides": []
           },
@@ -3808,7 +3808,7 @@
           "datasource": "${DS_PROMETHEUS}",
           "fieldConfig": {
             "defaults": {
-              "custom": {}
+              "unit": "s"
             },
             "overrides": []
           },
@@ -5150,7 +5150,7 @@
           "datasource": "${DS_PROMETHEUS}",
           "fieldConfig": {
             "defaults": {
-              "custom": {}
+              "unit": "s"
             },
             "overrides": []
           },
diff --git a/solr/prometheus-exporter/conf/solr-exporter-config.xml 
b/solr/prometheus-exporter/conf/solr-exporter-config.xml
index cd0b3221d2f..a03e79ec134 100644
--- a/solr/prometheus-exporter/conf/solr-exporter-config.xml
+++ b/solr/prometheus-exporter/conf/solr-exporter-config.xml
@@ -420,7 +420,7 @@
           </str>
           <str>
             .metrics["solr.jvm"] | to_entries | .[] | select(.key == 
"os.processCpuTime") as $object |
-            ($object.value / 1000.0) as $value |
+            ($object.value / 1000000000.0 ) as $value |
             {
               name         : "solr_metrics_jvm_os_cpu_time_seconds",
               type         : "COUNTER",
@@ -505,7 +505,7 @@
             $jq:node(timeouts_total, select(.key | endswith(".timeouts")), 
count)
           </str>
           <str>
-            $jq:node(time_seconds_total, select(.key | 
endswith(".totalTime")), ($object.value / 1000))
+            $jq:node(time_seconds_total, select(.key | 
endswith(".totalTime")), ($object.value / 1000000000.0))
           </str>
           <str>
             .metrics["solr.node"] | to_entries | .[] | select(.key | 
startswith("CONTAINER.cores.")) as $object |
@@ -615,7 +615,7 @@
             $jq:core(timeouts_total, select(.key | endswith(".timeouts")) | 
select (.value | type == "object"), count)
           </str>
           <str>
-            $jq:core(time_seconds_total, select(.key | 
endswith(".totalTime")), ($object.value / 1000))
+            $jq:core(time_seconds_total, select(.key | 
endswith(".totalTime")), ($object.value / 1000000000.0))
           </str>
           <str>
             .metrics | to_entries | .[] | select (.key | 
startswith("solr.core.")) as $parent |
diff --git 
a/solr/solr-ref-guide/modules/deployment-guide/pages/metrics-reporting.adoc 
b/solr/solr-ref-guide/modules/deployment-guide/pages/metrics-reporting.adoc
index ac069e247ec..d64bcaed646 100644
--- a/solr/solr-ref-guide/modules/deployment-guide/pages/metrics-reporting.adoc
+++ b/solr/solr-ref-guide/modules/deployment-guide/pages/metrics-reporting.adoc
@@ -58,7 +58,7 @@ When making requests with the <<Metrics API>>, you can 
specify `&group=jvm` to l
 
 * direct and mapped buffer pools
 * class loading / unloading
-* OS memory, CPU time, file descriptors, swap, system load
+* OS memory, CPU time in nanoseconds, file descriptors, swap, system load
 * GC count and time
 * heap, non-heap memory and GC pools
 * number of threads, their states and deadlocks
diff --git 
a/solr/solr-ref-guide/modules/deployment-guide/pages/performance-statistics-reference.adoc
 
b/solr/solr-ref-guide/modules/deployment-guide/pages/performance-statistics-reference.adoc
index 8d6b78b1ac7..653b3e5c757 100644
--- 
a/solr/solr-ref-guide/modules/deployment-guide/pages/performance-statistics-reference.adoc
+++ 
b/solr/solr-ref-guide/modules/deployment-guide/pages/performance-statistics-reference.adoc
@@ -95,7 +95,7 @@ The table below shows the metric names and attributes to 
request:
 |`QUERY./select.timeouts`
 `UPDATE./update.timeouts` |Number of responses received with partial results. 
In addition to a count of timeout events, mean, 1 minute, 5 minute, and 15 
minute rates are also available.
 |`QUERY./select.totalTime`
-`UPDATE./update.totalTime` |The sum of all request processing times since the 
Solr process was started.
+`UPDATE./update.totalTime` |The sum of all request processing times since the 
Solr process was started in nanoseconds.
 |`QUERY./select.handlerStart`
 `UPDATE./update.handlerStart` |Epoch time when the handler was registered.
 |===

Reply via email to