mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 06:44:27 +01:00
Merge #4330
4330: Add job variable to grafana dashboard r=irevoire a=capJavert # Pull Request ## Related issue Fixes https://github.com/orgs/meilisearch/discussions/625#discussioncomment-8143282 ## What does this PR do? "meilisearch" as [job_name](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#job_name) was hardcoded in the dashboard config so if user sets anything but "meilisearch" as job_name on prometheus side the dashboard does not work. With this change dasboard will auto load the values from data source (much like instance variable) and show the correct data. This now also adds support for multiple meilisearch jobs in single dashboard. See: https://github.com/orgs/meilisearch/discussions/625#discussioncomment-8143282 ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! Co-authored-by: capJavert <ante@kickass.website>
This commit is contained in:
commit
262b20fdba
@ -106,7 +106,7 @@
|
|||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"exemplar": true,
|
"exemplar": true,
|
||||||
"expr": "meilisearch_index_count{job=\"meilisearch\", instance=\"$instance\"}",
|
"expr": "meilisearch_index_count{job=\"$job\", instance=\"$instance\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "",
|
"legendFormat": "",
|
||||||
"range": true,
|
"range": true,
|
||||||
@ -165,7 +165,7 @@
|
|||||||
"type": "prometheus"
|
"type": "prometheus"
|
||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"expr": "meilisearch_index_docs_count{job=\"meilisearch\", index=\"$Index\", instance=\"$instance\"}",
|
"expr": "meilisearch_index_docs_count{job=\"$job\", index=\"$Index\", instance=\"$instance\"}",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@ -228,7 +228,7 @@
|
|||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"exemplar": true,
|
"exemplar": true,
|
||||||
"expr": "round(increase(meilisearch_http_requests_total{method=\"POST\", path=\"/indexes/$Index/search\", job=\"meilisearch\"}[1h]))",
|
"expr": "round(increase(meilisearch_http_requests_total{method=\"POST\", path=\"/indexes/$Index/search\", job=\"$job\"}[1h]))",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "",
|
"legendFormat": "",
|
||||||
"range": true,
|
"range": true,
|
||||||
@ -288,7 +288,7 @@
|
|||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"exemplar": true,
|
"exemplar": true,
|
||||||
"expr": "round(increase(meilisearch_http_requests_total{method=\"POST\", path=\"/indexes/$Index/search\", job=\"meilisearch\"}[24h]))",
|
"expr": "round(increase(meilisearch_http_requests_total{method=\"POST\", path=\"/indexes/$Index/search\", job=\"$job\"}[24h]))",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "",
|
"legendFormat": "",
|
||||||
"range": true,
|
"range": true,
|
||||||
@ -348,7 +348,7 @@
|
|||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"exemplar": true,
|
"exemplar": true,
|
||||||
"expr": "round(increase(meilisearch_http_requests_total{method=\"POST\", path=\"/indexes/$Index/search\", job=\"meilisearch\"}[30d]))",
|
"expr": "round(increase(meilisearch_http_requests_total{method=\"POST\", path=\"/indexes/$Index/search\", job=\"$job\"}[30d]))",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "",
|
"legendFormat": "",
|
||||||
"range": true,
|
"range": true,
|
||||||
@ -447,7 +447,7 @@
|
|||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"exemplar": true,
|
"exemplar": true,
|
||||||
"expr": "meilisearch_db_size_bytes{job=\"meilisearch\", instance=\"$instance\"}",
|
"expr": "meilisearch_db_size_bytes{job=\"$job\", instance=\"$instance\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "Database size on disk",
|
"legendFormat": "Database size on disk",
|
||||||
"range": true,
|
"range": true,
|
||||||
@ -458,7 +458,7 @@
|
|||||||
"type": "prometheus"
|
"type": "prometheus"
|
||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"expr": "meilisearch_used_db_size_bytes{job=\"meilisearch\", instance=\"$instance\"}",
|
"expr": "meilisearch_used_db_size_bytes{job=\"$job\", instance=\"$instance\"}",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"legendFormat": "Used bytes",
|
"legendFormat": "Used bytes",
|
||||||
"range": true,
|
"range": true,
|
||||||
@ -553,7 +553,7 @@
|
|||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"exemplar": true,
|
"exemplar": true,
|
||||||
"expr": "rate(meilisearch_http_response_time_seconds_sum{instance=\"$instance\", job=\"meilisearch\"}[5m]) / rate(meilisearch_http_response_time_seconds_count[5m])",
|
"expr": "rate(meilisearch_http_response_time_seconds_sum{instance=\"$instance\", job=\"$job\"}[5m]) / rate(meilisearch_http_response_time_seconds_count[5m])",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "{{method}} {{path}}",
|
"legendFormat": "{{method}} {{path}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
@ -646,7 +646,7 @@
|
|||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"exemplar": true,
|
"exemplar": true,
|
||||||
"expr": "rate(meilisearch_http_requests_total{instance=\"$instance\", job=\"meilisearch\"}[5m])",
|
"expr": "rate(meilisearch_http_requests_total{instance=\"$instance\", job=\"$job\"}[5m])",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "{{method}} {{path}}",
|
"legendFormat": "{{method}} {{path}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
@ -744,7 +744,7 @@
|
|||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"exemplar": true,
|
"exemplar": true,
|
||||||
"expr": "sum by(le) (increase(meilisearch_http_response_time_seconds_bucket{path=\"/indexes/$Index/search\", instance=\"$instance\", job=\"meilisearch\"}[30s]))",
|
"expr": "sum by(le) (increase(meilisearch_http_response_time_seconds_bucket{path=\"/indexes/$Index/search\", instance=\"$instance\", job=\"$job\"}[30s]))",
|
||||||
"format": "heatmap",
|
"format": "heatmap",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "{{le}}",
|
"legendFormat": "{{le}}",
|
||||||
@ -854,7 +854,7 @@
|
|||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"exemplar": true,
|
"exemplar": true,
|
||||||
"expr": "meilisearch_nb_tasks{instance=\"$instance\", job=\"meilisearch\", kind=\"statuses\"}",
|
"expr": "meilisearch_nb_tasks{instance=\"$instance\", job=\"$job\", kind=\"statuses\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "{{value}} ",
|
"legendFormat": "{{value}} ",
|
||||||
"range": true,
|
"range": true,
|
||||||
@ -947,7 +947,7 @@
|
|||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"exemplar": true,
|
"exemplar": true,
|
||||||
"expr": "meilisearch_nb_tasks{instance=\"$instance\", job=\"meilisearch\", kind=\"types\"}",
|
"expr": "meilisearch_nb_tasks{instance=\"$instance\", job=\"$job\", kind=\"types\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "{{value}} ",
|
"legendFormat": "{{value}} ",
|
||||||
"range": true,
|
"range": true,
|
||||||
@ -1040,7 +1040,7 @@
|
|||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"exemplar": true,
|
"exemplar": true,
|
||||||
"expr": "meilisearch_nb_tasks{instance=\"$instance\", job=\"meilisearch\", kind=\"indexes\"}",
|
"expr": "meilisearch_nb_tasks{instance=\"$instance\", job=\"$job\", kind=\"indexes\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "{{value}} ",
|
"legendFormat": "{{value}} ",
|
||||||
"range": true,
|
"range": true,
|
||||||
@ -1161,7 +1161,7 @@
|
|||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"exemplar": true,
|
"exemplar": true,
|
||||||
"expr": "rate(process_cpu_seconds_total{job=\"meilisearch\", instance=\"$instance\"}[1m])",
|
"expr": "rate(process_cpu_seconds_total{job=\"$job\", instance=\"$instance\"}[1m])",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "process",
|
"legendFormat": "process",
|
||||||
"range": true,
|
"range": true,
|
||||||
@ -1264,7 +1264,7 @@
|
|||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"exemplar": true,
|
"exemplar": true,
|
||||||
"expr": "process_resident_memory_bytes{job=\"meilisearch\", instance=\"$instance\"} / 1024 / 1024",
|
"expr": "process_resident_memory_bytes{job=\"$job\", instance=\"$instance\"} / 1024 / 1024",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "process",
|
"legendFormat": "process",
|
||||||
"range": true,
|
"range": true,
|
||||||
@ -1342,6 +1342,33 @@
|
|||||||
"skipUrlSync": false,
|
"skipUrlSync": false,
|
||||||
"sort": 0,
|
"sort": 0,
|
||||||
"type": "query"
|
"type": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"current": {
|
||||||
|
"selected": true,
|
||||||
|
"text": "meilisearch",
|
||||||
|
"value": "meilisearch"
|
||||||
|
},
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus"
|
||||||
|
},
|
||||||
|
"definition": "label_values(job)",
|
||||||
|
"description": "Prometheus job_name from scrape config (default is meilisearch)",
|
||||||
|
"hide": 0,
|
||||||
|
"includeAll": false,
|
||||||
|
"label": "Job",
|
||||||
|
"multi": false,
|
||||||
|
"name": "job",
|
||||||
|
"options": [],
|
||||||
|
"query": {
|
||||||
|
"query": "label_values(job)",
|
||||||
|
"refId": "StandardVariableQuery"
|
||||||
|
},
|
||||||
|
"refresh": 1,
|
||||||
|
"regex": "",
|
||||||
|
"skipUrlSync": false,
|
||||||
|
"sort": 0,
|
||||||
|
"type": "query"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user