From 3bc873e6d403ad2ebd69a3050712cc8cac967241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Mon, 19 Oct 2020 14:49:02 +0200 Subject: [PATCH] SOLR-14936: Fixed Grafana dashboard filters for collection, shard, replica and core (#1986) --- solr/CHANGES.txt | 2 + .../conf/grafana-solr-dashboard.json | 191 ++++++++++-------- 2 files changed, 105 insertions(+), 88 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 06384bd463a..0fd80e69eaa 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -268,6 +268,8 @@ Bug Fixes * SOLR-14503: Use specified waitForZk value as connection timeout for zookeeper in SolrDispatcherFilter. Also, consume specified SOLR_WAIT_FOR_ZK in bin/solr.cmd (Colvin Cowie via Munendra S N) +* SOLR-14936: Fixed Grafana dashboard filters for collection, shard, replica and core (janhoy) + * SOLR-14924: Some ReplicationHandler metrics are reported using incorrect types. (ab) * SOLR-14483: Fix empty drop down for adding replica in Admin UI (Sayan Das via Eric Pugh) diff --git a/solr/contrib/prometheus-exporter/conf/grafana-solr-dashboard.json b/solr/contrib/prometheus-exporter/conf/grafana-solr-dashboard.json index 96fb8184cd0..53a463f33f7 100644 --- a/solr/contrib/prometheus-exporter/conf/grafana-solr-dashboard.json +++ b/solr/contrib/prometheus-exporter/conf/grafana-solr-dashboard.json @@ -48,7 +48,22 @@ "graphTooltip": 0, "hideControls": false, "id": null, - "links": [], + "links": [ + { + "icon": "external link", + "tags": [], + "title": "Solr project", + "type": "link", + "url": "https://lucene.apache.org/solr/" + }, + { + "icon": "external link", + "tags": [], + "title": "Solr Prometheus documentation", + "type": "link", + "url": "https://lucene.apache.org/solr/guide/monitoring-solr-with-prometheus-and-grafana.html" + } + ], "refresh": "1m", "rows": [ { @@ -2348,7 +2363,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_requests_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_requests_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}{{handler}}", @@ -2424,7 +2439,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_time_seconds_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_time_seconds_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}{{handler}}", @@ -2500,7 +2515,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_client_errors_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_client_errors_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}{{handler}}", @@ -2576,7 +2591,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_server_errors_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_server_errors_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}{{handler}}", @@ -2652,7 +2667,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_errors_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_errors_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}{{handler}}", @@ -2728,7 +2743,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_timeouts_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_timeouts_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}{{handler}}", @@ -2804,7 +2819,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_field_cache_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_field_cache_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -2880,7 +2895,7 @@ "steppedLine": false, "targets": [ { - "expr": "solr_metrics_core_searcher_cache{base_url=~\"$base_url\"}", + "expr": "solr_metrics_core_searcher_cache{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}} {{type}} {{item}}", @@ -2956,7 +2971,7 @@ "steppedLine": false, "targets": [ { - "expr": "solr_metrics_core_searcher_warmup_time_seconds{base_url=~\"$base_url\"}", + "expr": "solr_metrics_core_searcher_warmup_time_seconds{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}} {{type}}", @@ -3032,7 +3047,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_searcher_cumulative_cache_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_searcher_cumulative_cache_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}} {{type}} {{item}}", @@ -3108,7 +3123,7 @@ "steppedLine": false, "targets": [ { - "expr": "solr_metrics_core_fs_bytes{base_url=~\"$base_url\"}", + "expr": "solr_metrics_core_fs_bytes{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -3184,7 +3199,7 @@ "steppedLine": false, "targets": [ { - "expr": "solr_metrics_core_index_size_bytes{base_url=~\"$base_url\"}", + "expr": "solr_metrics_core_index_size_bytes{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -3261,7 +3276,7 @@ "steppedLine": false, "targets": [ { - "expr": "solr_metrics_core_searcher_documents{base_url=~\"$base_url\"}", + "expr": "solr_metrics_core_searcher_documents{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}} {{item}}", @@ -3338,7 +3353,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_update_handler_adds_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_update_handler_adds_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -3414,7 +3429,7 @@ "steppedLine": false, "targets": [ { - "expr": "solr_metrics_core_update_handler_pending_docs{base_url=~\"$base_url\"}", + "expr": "solr_metrics_core_update_handler_pending_docs{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -3490,7 +3505,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_update_handler_deletes_by_id_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_update_handler_deletes_by_id_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -3566,7 +3581,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_update_handler_deletes_by_query_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_update_handler_deletes_by_query_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -3642,7 +3657,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_update_handler_expunge_deletes_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_update_handler_expunge_deletes_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -3718,7 +3733,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_update_handler_merges_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_update_handler_merges_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -3794,7 +3809,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_update_handler_splits_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_update_handler_splits_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -3870,7 +3885,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_update_handler_optimizes_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_update_handler_optimizes_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -3946,7 +3961,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_update_handler_rollbacks_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_update_handler_rollbacks_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -4022,7 +4037,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_update_handler_soft_auto_commits_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_update_handler_soft_auto_commits_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -4098,7 +4113,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_update_handler_auto_commits_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_update_handler_auto_commits_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -4174,7 +4189,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_update_handler_commits_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_update_handler_commits_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -4251,7 +4266,7 @@ "steppedLine": false, "targets": [ { - "expr": "increase(solr_metrics_core_update_handler_errors_total{base_url=~\"$base_url\"}[1m])", + "expr": "increase(solr_metrics_core_update_handler_errors_total{base_url=~\"$base_url\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\",core=~\"$core\"}[1m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{base_url}}/{{core}}", @@ -4328,66 +4343,6 @@ "type": "query", "useTags": false }, - { - "allValue": ".*", - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "hide": 0, - "includeAll": true, - "label": null, - "multi": true, - "name": "collection", - "options": [], - "query": "label_values(solr_ping{zk_host=\"$zk_host\",collection=~\".+\"},collection)", - "refresh": 1, - "regex": "/(.+)/", - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "hide": 0, - "includeAll": true, - "label": null, - "multi": true, - "name": "shard", - "options": [], - "query": "label_values(solr_collections_shard_state{zk_host=\"$zk_host\",collection=\"$collection\",shard=~\".+\"},shard)", - "refresh": 1, - "regex": "/(.+)/", - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "hide": 0, - "includeAll": true, - "label": null, - "multi": true, - "name": "replica", - "options": [], - "query": "label_values(solr_collections_replica_state{zk_host=\"$zk_host\",collection=\"$collection\",shard=\"$shard\",replica=\".+\"},replica)", - "refresh": 1, - "regex": "/(.+)/", - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, { "allValue": ".*", "current": {}, @@ -4408,6 +4363,66 @@ "type": "query", "useTags": false }, + { + "allValue": ".*", + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "collection", + "options": [], + "query": "label_values(solr_collections_shard_state{zk_host=~\"$zk_host\",collection=~\".+\"},collection)", + "refresh": 1, + "regex": "/(.+)/", + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "shard", + "options": [], + "query": "label_values(solr_collections_shard_state{zk_host=~\"$zk_host\",collection=~\"$collection\",shard=~\".+\"},shard)", + "refresh": 1, + "regex": "/(.+)/", + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": {}, + "datasource": "${DS_PROMETHEUS}", + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "replica", + "options": [], + "query": "label_values(solr_collections_replica_state{zk_host=~\"$zk_host\",collection=~\"$collection\",shard=~\"$shard\",replica=~\".+\"},replica)", + "refresh": 1, + "regex": "/(.+)/", + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, { "allValue": ".*", "current": {}, @@ -4418,7 +4433,7 @@ "multi": true, "name": "core", "options": [], - "query": "label_values(solr_ping{base_url=~\"$base_url\"},core)", + "query": "label_values(solr_collections_replica_state{zk_host=~\"$zk_host\",collection=~\"$collection\",shard=~\"$shard\",replica=~\"$replica\"},core)", "refresh": 1, "regex": "/(.+)/", "sort": 1,