]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
monitoring/ceph-mixin: Add cluster variable to ceph-cluster.json 56575/head
authorcloudbehl <cloudbehl@gmail.com>
Fri, 29 Mar 2024 07:48:50 +0000 (13:18 +0530)
committercloudbehl <cloudbehl@gmail.com>
Fri, 29 Mar 2024 07:59:33 +0000 (13:29 +0530)
Fixes: https://tracker.ceph.com/issues/65218
Signed-off-by: cloudbehl <cloudbehl@gmail.com>
monitoring/ceph-mixin/dashboards_out/ceph-cluster.json

index 95ff659e3977b04b6580840d3e56c5f7759964df..3bd150e9ae263c4cf9732832a3d8070b5f931e4c 100644 (file)
       "tableColumn": "",
       "targets": [
         {
-          "expr": "ceph_health_status",
+          "expr": "ceph_health_status{cluster=~'$cluster'}",
           "format": "time_series",
           "instant": true,
           "interval": "$interval",
           "displayAliasType": "Always",
           "displayType": "Regular",
           "displayValueWithAlias": "When Alias Displayed",
-          "expr": "count(ceph_osd_metadata)",
+          "expr": "count(ceph_osd_metadata{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "All",
           "displayAliasType": "Always",
           "displayType": "Regular",
           "displayValueWithAlias": "When Alias Displayed",
-          "expr": "sum(ceph_osd_in)",
+          "expr": "sum(ceph_osd_in{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "In",
           "displayAliasType": "Warning / Critical",
           "displayType": "Regular",
           "displayValueWithAlias": "When Alias Displayed",
-          "expr": "sum(ceph_osd_in == bool 0)",
+          "expr": "sum(ceph_osd_in{cluster=~'$cluster'} == bool 0)",
           "format": "time_series",
           "interval": "",
           "intervalFactor": 1,
           "displayAliasType": "Always",
           "displayType": "Regular",
           "displayValueWithAlias": "When Alias Displayed",
-          "expr": "sum(ceph_osd_up)",
+          "expr": "sum(ceph_osd_up{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Up",
           "displayAliasType": "Warning / Critical",
           "displayType": "Regular",
           "displayValueWithAlias": "When Alias Displayed",
-          "expr": "sum(ceph_osd_up == bool 0)",
+          "expr": "sum(ceph_osd_up{cluster=~'$cluster'} == bool 0)",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Down",
           "displayAliasType": "Always",
           "displayType": "Regular",
           "displayValueWithAlias": "When Alias Displayed",
-          "expr": "sum(ceph_mon_quorum_status)",
+          "expr": "sum(ceph_mon_quorum_status{cluster=~'$cluster'})",
           "format": "time_series",
           "interval": "",
           "intervalFactor": 1,
           "displayAliasType": "Always",
           "displayType": "Regular",
           "displayValueWithAlias": "When Alias Displayed",
-          "expr": "count(ceph_mon_quorum_status)",
+          "expr": "count(ceph_mon_quorum_status{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Total",
           "displayAliasType": "Warning / Critical",
           "displayType": "Annotation",
           "displayValueWithAlias": "Never",
-          "expr": "count(ceph_mon_quorum_status) - sum(ceph_mon_quorum_status)",
+          "expr": "count(ceph_mon_quorum_status{cluster=~'$cluster'}) - sum(ceph_mon_quorum_status{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "MONs out of Quorum",
           "displayAliasType": "Always",
           "displayType": "Regular",
           "displayValueWithAlias": "When Alias Displayed",
-          "expr": "count(ceph_mgr_status == 1) or vector(0)",
+          "expr": "count(ceph_mgr_status{cluster=~'$cluster'} == 1) or vector(0)",
           "format": "time_series",
           "intervalFactor": 1,
           "instant": true,
           "displayAliasType": "Always",
           "displayType": "Regular",
           "displayValueWithAlias": "When Alias Displayed",
-          "expr": "count(ceph_mgr_status == 0) or vector(0)",
+          "expr": "count(ceph_mgr_status{cluster=~'$cluster'} == 0) or vector(0)",
           "format": "time_series",
           "instant": true,
           "intervalFactor": 1,
       "tableColumn": "",
       "targets": [
         {
-          "expr": "sum(ceph_osd_stat_bytes_used)/sum(ceph_osd_stat_bytes)",
+          "expr": "sum(ceph_osd_stat_bytes_used{cluster=~'$cluster'})/sum(ceph_osd_stat_bytes{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Used",
       "steppedLine": false,
       "targets": [
         {
-          "expr": "sum(ceph_pg_total)",
+          "expr": "sum(ceph_pg_total{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Total",
           "refId": "A"
         },
         {
-          "expr": "sum(ceph_pg_active)",
+          "expr": "sum(ceph_pg_active{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Active",
           "refId": "B"
         },
         {
-          "expr": "sum(ceph_pg_total - ceph_pg_active)",
+          "expr": "sum(ceph_pg_total{cluster=~'$cluster'} - ceph_pg_active{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Inactive",
           "refId": "G"
         },
         {
-          "expr": "sum(ceph_pg_undersized)",
+          "expr": "sum(ceph_pg_undersized{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Undersized",
           "refId": "F"
         },
         {
-          "expr": "sum(ceph_pg_degraded)",
+          "expr": "sum(ceph_pg_degraded{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Degraded",
           "refId": "C"
         },
         {
-          "expr": "sum(ceph_pg_inconsistent)",
+          "expr": "sum(ceph_pg_inconsistent{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Inconsistent",
           "refId": "D"
         },
         {
-          "expr": "sum(ceph_pg_down)",
+          "expr": "sum(ceph_pg_down{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Down",
       "steppedLine": false,
       "targets": [
         {
-          "expr": "quantile(0.95, ceph_osd_apply_latency_ms)",
+          "expr": "quantile(0.95, ceph_osd_apply_latency_ms{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Apply Latency P_95",
           "refId": "A"
         },
         {
-          "expr": "quantile(0.95, ceph_osd_commit_latency_ms)",
+          "expr": "quantile(0.95, ceph_osd_commit_latency_ms{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Commit Latency P_95",
           "refId": "B"
         },
         {
-          "expr": "avg(ceph_osd_apply_latency_ms)",
+          "expr": "avg(ceph_osd_apply_latency_ms{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Avg Apply Latency",
           "refId": "C"
         },
         {
-          "expr": "avg(ceph_osd_commit_latency_ms)",
+          "expr": "avg(ceph_osd_commit_latency_ms{cluster=~'$cluster'})",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Avg Commit Latency",
       "steppedLine": false,
       "targets": [
         {
-          "expr": "sum(irate(ceph_osd_op_w_in_bytes[1m]))",
+          "expr": "sum(irate(ceph_osd_op_w_in_bytes{cluster=~'$cluster'}[1m]))",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Writes",
           "refId": "A"
         },
         {
-          "expr": "sum(irate(ceph_osd_op_r_out_bytes[1m]))",
+          "expr": "sum(irate(ceph_osd_op_r_out_bytes{cluster=~'$cluster'}[1m]))",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Reads",
       "steppedLine": false,
       "targets": [
         {
-          "expr": "sum(deriv(ceph_pool_stored[1m]))",
+          "expr": "sum(deriv(ceph_pool_stored{cluster=~'$cluster'}[1m]))",
           "format": "time_series",
           "intervalFactor": 1,
           "refId": "A"
       "span": 12,
       "targets": [
         {
-          "expr": "ceph_osd_stat_bytes_used / ceph_osd_stat_bytes",
+          "expr": "ceph_osd_stat_bytes_used{cluster=~'$cluster'} / ceph_osd_stat_bytes{cluster=~'$cluster'}",
           "format": "time_series",
           "interval": "1m",
           "intervalFactor": 1,
       "links": [],
       "targets": [
         {
-          "expr": "ceph_osd_numpg",
+          "expr": "ceph_osd_numpg{cluster=~'$cluster'}",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "#PGs",
       "steppedLine": false,
       "targets": [
         {
-          "expr": "sum(irate(ceph_osd_recovery_ops[1m]))",
+          "expr": "sum(irate(ceph_osd_recovery_ops{cluster=~'$cluster'}[1m]))",
           "format": "time_series",
           "intervalFactor": 1,
           "legendFormat": "Op/s",
         "regex": "",
         "type": "datasource"
       },
+      {
+        "datasource": {
+          "type": "prometheus",
+          "uid": "${datasource}"
+        },
+        "definition": "label_values(ceph_health_status, cluster)",
+        "hide": 0,
+        "includeAll": false,
+        "label": "Cluster",
+        "multi": false,
+        "name": "cluster",
+        "options": [],
+        "query": {
+          "query": "label_values(ceph_health_status, cluster)",
+          "refId": "StandardVariableQuery"
+        },
+        "refresh": 1,
+        "regex": "",
+        "skipUrlSync": false,
+        "sort": 0,
+        "type": "query"
+      },
       {
         "auto": true,
         "auto_count": 10,