Skip to content

Commit

Permalink
SOLR-14401: Add back in missing metric and fix graphana dashboard (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
HoustonPutman committed Mar 28, 2022
1 parent 3588846 commit 96650fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion solr/docker/tests/cases/prometheus-exporter/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions solr/prometheus-exporter/conf/grafana-solr-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "",
Expand Down Expand Up @@ -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": "",
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions solr/prometheus-exporter/conf/solr-exporter-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,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>
Expand Down

0 comments on commit 96650fb

Please sign in to comment.