Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-14401: Add back in missing metric and fix graphana dashboard #770

Merged
merged 2 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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