You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2022/03/28 22:31:28 UTC
[solr] branch branch_9_0 updated: SOLR-14401: Add back in missing metric and fix graphana dashboard (#770)
This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch branch_9_0
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9_0 by this push:
new e7e387b SOLR-14401: Add back in missing metric and fix graphana dashboard (#770)
e7e387b is described below
commit e7e387b0548fc7bb98df1f7913c412674ee16f06
Author: Houston Putman <ho...@apache.org>
AuthorDate: Mon Mar 28 17:26:31 2022 -0400
SOLR-14401: Add back in missing metric and fix graphana dashboard (#770)
(cherry picked from commit 96650fbbc6351a98dbdda374bf641b962056ccf9)
---
solr/docker/tests/cases/prometheus-exporter/test.sh | 2 +-
solr/prometheus-exporter/conf/grafana-solr-dashboard.json | 6 +++---
solr/prometheus-exporter/conf/solr-exporter-config.xml | 3 +++
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/solr/docker/tests/cases/prometheus-exporter/test.sh b/solr/docker/tests/cases/prometheus-exporter/test.sh
index 0aa01b1..76a972f 100755
--- a/solr/docker/tests/cases/prometheus-exporter/test.sh
+++ b/solr/docker/tests/cases/prometheus-exporter/test.sh
@@ -41,7 +41,7 @@ docker exec --user=solr "${container_name}-solr" wget -q -O - 'http://localhost:
echo "Checking prometheus data"
data=$(docker exec --user=solr "$container_name" wget -q -O - 'http://localhost:8989/metrics')
-if ! grep -E -q 'solr_metrics_core_requests_total{category="QUERY",handler="/select",internal="false",core="demo",base_url="http://solr-host:8983/solr",} [0-9]+.0' <<<"$data"; then
+if ! grep -E -q 'solr_metrics_core_query_requests_total{category="QUERY",searchHandler="/select",internal="false",core="demo",base_url="http://solr-host:8983/solr",} [0-9]+.0' <<<"$data"; then
echo "Test $TEST_NAME $tag failed; did not find correct data"
echo "$data"
exit 1
diff --git a/solr/prometheus-exporter/conf/grafana-solr-dashboard.json b/solr/prometheus-exporter/conf/grafana-solr-dashboard.json
index 172a6e5..4f709c1 100644
--- a/solr/prometheus-exporter/conf/grafana-solr-dashboard.json
+++ b/solr/prometheus-exporter/conf/grafana-solr-dashboard.json
@@ -1501,7 +1501,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "increase(solr_metrics_core_query_local_count{internal!=\"false\",base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\",searchHandler=~\"$searchHandler\"}[1m])",
+ "expr": "increase(solr_metrics_core_query_requests_total{internal!=\"false\",base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\",searchHandler=~\"$searchHandler\"}[1m])",
"format": "time_series",
"instant": false,
"interval": "",
@@ -1603,7 +1603,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "solr_metrics_core_query_local_1minRate{internal!=\"false\",base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\",searchHandler=~\"$searchHandler\"}",
+ "expr": "solr_metrics_core_query_1minRate{internal!=\"false\",base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\",searchHandler=~\"$searchHandler\"}",
"format": "time_series",
"instant": false,
"interval": "",
@@ -1705,7 +1705,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "solr_metrics_core_query_local_p95_ms{internal!=\"false\",base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\",searchHandler=~\"$searchHandler\"}",
+ "expr": "solr_metrics_core_query_p95_ms{internal!=\"false\",base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\",searchHandler=~\"$searchHandler\"}",
"format": "time_series",
"interval": "",
"intervalFactor": 3,
diff --git a/solr/prometheus-exporter/conf/solr-exporter-config.xml b/solr/prometheus-exporter/conf/solr-exporter-config.xml
index 8e03b9f..d13a6f4 100644
--- a/solr/prometheus-exporter/conf/solr-exporter-config.xml
+++ b/solr/prometheus-exporter/conf/solr-exporter-config.xml
@@ -568,6 +568,9 @@
Query related core metrics; see jq-templates for details on the core-query template used below
-->
<str>
+ $jq:core-query(requests_total, select(.key | endswith(".requestTimes")), count, COUNTER)
+ </str>
+ <str>
$jq:core-query(errors_1minRate, select(.key | endswith(".errors")), 1minRate)
</str>
<str>