From 05a01d8bf9584ef78ee8592cbe4576886134c3c2 Mon Sep 17 00:00:00 2001 From: Hardik Leuva Date: Thu, 9 Sep 2021 15:04:35 +0530 Subject: [PATCH 1/2] fix: consuming node status from diagnosis-config-get-iter zapi for 7mode --- conf/zapi/7mode/8.6.0/status_7.yaml | 24 +++++++++++++++++++ conf/zapi/default.yaml | 1 + .../7mode/harvest_dashboard_cluster7.json | 6 ++--- 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 conf/zapi/7mode/8.6.0/status_7.yaml diff --git a/conf/zapi/7mode/8.6.0/status_7.yaml b/conf/zapi/7mode/8.6.0/status_7.yaml new file mode 100644 index 000000000..ae335df39 --- /dev/null +++ b/conf/zapi/7mode/8.6.0/status_7.yaml @@ -0,0 +1,24 @@ +# API provides over system health of a cluster + +name: Status_7mode +query: diagnosis-config-get-iter +object: node + +counters: + diagnosis-config-info: + - ^health => health + - ^^monitor => monitor + - mon-version => monitor_version + +collect_only_labels: true + +plugins: + - LabelAgent: + value_mapping: 7mode_status health ok `1` + # metric label zapi_value rest_value `default_value` + value_to_num: 7mode_new_status health ok todo `0` + +export_options: + instance_keys: + - monitor + - health \ No newline at end of file diff --git a/conf/zapi/default.yaml b/conf/zapi/default.yaml index c7b559499..1b2d76b11 100644 --- a/conf/zapi/default.yaml +++ b/conf/zapi/default.yaml @@ -16,3 +16,4 @@ objects: Status: status.yaml Subsystem: subsystem.yaml Lun: lun.yaml + Status_7mode: status_7.yaml diff --git a/grafana/dashboards/7mode/harvest_dashboard_cluster7.json b/grafana/dashboards/7mode/harvest_dashboard_cluster7.json index d1f24d8ed..304e54643 100644 --- a/grafana/dashboards/7mode/harvest_dashboard_cluster7.json +++ b/grafana/dashboards/7mode/harvest_dashboard_cluster7.json @@ -236,7 +236,7 @@ }, { "exemplar": false, - "expr": "cluster_new_status{datacenter=\"$Datacenter\",cluster=\"$Cluster\"}", + "expr": "node_7mode_new_status{datacenter=\"$Datacenter\",cluster=\"$Cluster\",monitor=\"node-connect\"}", "format": "table", "hide": false, "instant": true, @@ -406,7 +406,7 @@ "calcs": [ "lastNotNull" ], - "fields": "/^status$/", + "fields": "/^health$/", "values": false }, "text": {}, @@ -418,7 +418,7 @@ "targets": [ { "exemplar": false, - "expr": "cluster_new_status{datacenter=~\"$Datacenter\",cluster=\"$Cluster\"}", + "expr": "node_7mode_new_status{datacenter=\"$Datacenter\",cluster=\"$Cluster\", monitor=\"node-connect\"}", "instant": true, "interval": "", "legendFormat": "", From 289bb5e3aeb6179fe06f1900d89b0c87b35448c0 Mon Sep 17 00:00:00 2001 From: Hardik Leuva Date: Thu, 9 Sep 2021 18:04:57 +0530 Subject: [PATCH 2/2] fix: consuming node status from diagnosis-config-get-iter zapi for 7mode --- conf/zapi/7mode/8.6.0/status_7.yaml | 3 +-- grafana/dashboards/7mode/harvest_dashboard_cluster7.json | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/conf/zapi/7mode/8.6.0/status_7.yaml b/conf/zapi/7mode/8.6.0/status_7.yaml index ae335df39..f7349ef29 100644 --- a/conf/zapi/7mode/8.6.0/status_7.yaml +++ b/conf/zapi/7mode/8.6.0/status_7.yaml @@ -14,9 +14,8 @@ collect_only_labels: true plugins: - LabelAgent: - value_mapping: 7mode_status health ok `1` # metric label zapi_value rest_value `default_value` - value_to_num: 7mode_new_status health ok todo `0` + value_to_num: 7mode_status health ok todo `0` export_options: instance_keys: diff --git a/grafana/dashboards/7mode/harvest_dashboard_cluster7.json b/grafana/dashboards/7mode/harvest_dashboard_cluster7.json index 304e54643..d63023b46 100644 --- a/grafana/dashboards/7mode/harvest_dashboard_cluster7.json +++ b/grafana/dashboards/7mode/harvest_dashboard_cluster7.json @@ -236,7 +236,7 @@ }, { "exemplar": false, - "expr": "node_7mode_new_status{datacenter=\"$Datacenter\",cluster=\"$Cluster\",monitor=\"node-connect\"}", + "expr": "node_7mode_status{datacenter=\"$Datacenter\",cluster=\"$Cluster\",monitor=\"node-connect\"}", "format": "table", "hide": false, "instant": true, @@ -418,7 +418,7 @@ "targets": [ { "exemplar": false, - "expr": "node_7mode_new_status{datacenter=\"$Datacenter\",cluster=\"$Cluster\", monitor=\"node-connect\"}", + "expr": "node_7mode_status{datacenter=\"$Datacenter\",cluster=\"$Cluster\", monitor=\"node-connect\"}", "instant": true, "interval": "", "legendFormat": "",