diff --git a/files/dashboards/opensearch.json b/files/dashboards/opensearch.json index e101453..9e359b4 100644 --- a/files/dashboards/opensearch.json +++ b/files/dashboards/opensearch.json @@ -1,41 +1,4 @@ { - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "9.4.3" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph (old)", - "version": "" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - } - ], "annotations": { "list": [ { @@ -63,7 +26,7 @@ "fiscalYearStartMonth": 0, "gnetId": 15178, "graphTooltip": 0, - "id": null, + "id": 12, "links": [], "liveNow": false, "panels": [ @@ -96,7 +59,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "description": "", "fieldConfig": { @@ -172,7 +135,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "exemplar": true, "expr": "sum(opensearch_cluster_status{cluster=~\"$cluster\"}) / count(opensearch_cluster_nodes_number{cluster=~\"$cluster\"})", @@ -189,7 +152,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "description": "", "fieldConfig": { @@ -239,7 +202,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "exemplar": true, "expr": "sum(opensearch_cluster_nodes_number{cluster=~\"$cluster\"}) / count(opensearch_cluster_nodes_number{cluster=~\"$cluster\"})", @@ -255,7 +218,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { @@ -304,7 +267,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "exemplar": true, "expr": "sum(opensearch_cluster_datanodes_number{cluster=~\"$cluster\"}) / count(opensearch_cluster_datanodes_number{cluster=~\"$cluster\"})", @@ -320,7 +283,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { @@ -373,7 +336,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "exemplar": true, "expr": "sum(opensearch_cluster_pending_tasks_number{cluster=~\"$cluster\"}) / count(opensearch_cluster_pending_tasks_number{cluster=~\"$cluster\"})", @@ -415,7 +378,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "description": "", "fieldConfig": { @@ -465,7 +428,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "exemplar": true, "expr": "sum(opensearch_cluster_shards_number{cluster=~\"$cluster\",type=\"active\"}) / count(opensearch_cluster_shards_number{cluster=~\"$cluster\",type=\"active\"})", @@ -481,7 +444,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { @@ -530,7 +493,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "exemplar": true, "expr": "sum(opensearch_cluster_shards_number{cluster=~\"$cluster\",type=\"active_primary\"}) / count(opensearch_cluster_shards_number{cluster=~\"$cluster\",type=\"active_primary\"})", @@ -546,7 +509,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "description": "", "fieldConfig": { @@ -600,7 +563,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "exemplar": true, "expr": "sum(opensearch_cluster_shards_number{cluster=~\"$cluster\",type=\"initializing\"}) / count(opensearch_cluster_shards_number{cluster=~\"$cluster\",type=\"initializing\"})", @@ -616,7 +579,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { @@ -669,7 +632,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "exemplar": true, "expr": "sum(opensearch_cluster_shards_number{cluster=~\"$cluster\",type=\"relocating\"}) / count(opensearch_cluster_shards_number{cluster=~\"$cluster\",type=\"relocating\"})", @@ -685,7 +648,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "description": "", "fieldConfig": { @@ -743,7 +706,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "exemplar": true, "expr": "sum(opensearch_cluster_shards_number{cluster=~\"$cluster\",type=\"unassigned\"}) / count(opensearch_cluster_shards_number{cluster=~\"$cluster\",type=\"unassigned\"})", @@ -1082,7 +1045,7 @@ "dashes": false, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "fill": 1, "fillGradient": 0, @@ -1123,7 +1086,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "exemplar": true, "expr": "sum(opensearch_indices_merges_total_docs_count{cluster=~\"$cluster\"})", @@ -1311,7 +1274,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "9.4.3", + "pluginVersion": "7.5.10", "pointradius": 5, "points": false, "renderer": "flot", @@ -1406,7 +1369,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "9.4.3", + "pluginVersion": "7.5.10", "pointradius": 5, "points": false, "renderer": "flot", @@ -1504,7 +1467,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "9.4.3", + "pluginVersion": "7.5.10", "pointradius": 5, "points": false, "renderer": "flot", @@ -1938,7 +1901,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "9.4.3", + "pluginVersion": "7.5.10", "pointradius": 5, "points": false, "renderer": "flot", @@ -2038,7 +2001,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "9.4.3", + "pluginVersion": "7.5.10", "pointradius": 5, "points": false, "renderer": "flot", @@ -2134,7 +2097,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "9.4.3", + "pluginVersion": "7.5.10", "pointradius": 5, "points": false, "renderer": "flot", @@ -2255,7 +2218,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "9.4.3", + "pluginVersion": "7.5.10", "pointradius": 5, "points": false, "renderer": "flot", @@ -2359,7 +2322,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "9.4.3", + "pluginVersion": "7.5.10", "pointradius": 5, "points": false, "renderer": "flot", @@ -2472,7 +2435,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "9.4.3", + "pluginVersion": "7.5.10", "pointradius": 5, "points": false, "renderer": "flot", @@ -2537,7 +2500,7 @@ "list": [ { "current": { - "selected": true, + "selected": false, "text": "Prometheus", "value": "Prometheus" }, @@ -2554,10 +2517,15 @@ "type": "datasource" }, { - "current": {}, + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "definition": "label_values(opensearch_cluster_status{}, cluster)", "hide": 0, @@ -2579,10 +2547,15 @@ "useTags": false }, { - "current": {}, + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "definition": "label_values(node_uname_info{job=~\".*kubernetes.*|.*node_exporters.*\"}, job)", "hide": 0, @@ -2605,10 +2578,15 @@ "useTags": false }, { - "current": {}, + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "definition": "label_values(node_uname_info{job=\"$job\"}, nodename)", "hide": 0, @@ -2631,10 +2609,15 @@ "useTags": false }, { - "current": {}, + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "yPhvsDP7k" }, "definition": "label_values(node_uname_info{job=\"$job\", nodename=\"$nodename\"}, instance)", "hide": 0, @@ -2664,8 +2647,8 @@ }, "timepicker": {}, "timezone": "browser", - "title": "OpenSearch Prometheus", + "title": "OpenSearch", "uid": "X1WSwkF7kE", "version": 1, "weekStart": "" -} \ No newline at end of file +} diff --git a/templates/conf/prometheus.yml.j2 b/templates/conf/prometheus.yml.j2 index 3da6286..3de0f83 100644 --- a/templates/conf/prometheus.yml.j2 +++ b/templates/conf/prometheus.yml.j2 @@ -414,6 +414,9 @@ scrape_configs: {% for target in prometheus_opensearch_exporter_targets %} - {{ target }}:9200 {% endfor %} + basic_auth: + username: {{ opensearch_user }} + password: {{ opensearch_pass }} relabel_configs: - source_labels: [ __address__ ] target_label: instance