apiVersion: v1
kind: ConfigMap
metadata:
  name: assisted-installer-validations
  labels:
    grafana_dashboard: "true"
  annotations:
    grafana-folder: /grafana-dashboard-definitions/AssistedInstaller
data:
  assisted-installer.json: |-
    {
      "annotations": {
        "list": [
          {
            "builtIn": 1,
            "datasource": "-- Grafana --",
            "enable": true,
            "hide": true,
            "iconColor": "rgba(0, 211, 255, 1)",
            "name": "Annotations & Alerts",
            "type": "dashboard"
          }
        ]
      },
      "description": "",
      "editable": true,
      "gnetId": null,
      "graphTooltip": 0,
      "id": 5,
      "iteration": 1618829135069,
      "links": [],
      "panels": [
        {
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 0,
            "y": 0
          },
          "id": 2,
          "options": {
            "displayMode": "gradient",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "showUnfilled": true
          },
          "pluginVersion": "7.2.1",
          "targets": [
            {
              "expr": "sum(increase(service_assisted_installer_host_validation_failed_after_success_before_installation[$__range:$__rate_interval])) by (hostValidationType)",
              "interval": "",
              "legendFormat": "{hostValidationType}}",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Host - Cluster lifecycle",
          "type": "bargauge"
        },
        {
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 12,
            "y": 0
          },
          "id": 5,
          "options": {
            "displayMode": "gradient",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "showUnfilled": true
          },
          "pluginVersion": "7.2.1",
          "targets": [
            {
              "expr": "sum(increase(service_assisted_installer_host_validation_is_in_failed_status_on_cluster_deletion[$__range:$__rate_interval])) by (hostValidationType)",
              "interval": "",
              "legendFormat": "{hostValidationType}}",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Host - On cluster deregistration",
          "type": "bargauge"
        },
        {
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 0,
            "y": 9
          },
          "id": 3,
          "options": {
            "displayMode": "gradient",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "showUnfilled": true
          },
          "pluginVersion": "7.2.1",
          "targets": [
            {
              "expr": "sum(increase(service_assisted_installer_cluster_validation_failed_after_success_before_installation[$__range:$__rate_interval])) by (clusterValidationType)",
              "interval": "",
              "legendFormat": "{hostValidationType}}",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Cluster - Cluster lifecycle",
          "type": "bargauge"
        },
        {
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 12,
            "y": 9
          },
          "id": 4,
          "options": {
            "displayMode": "gradient",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "showUnfilled": true
          },
          "pluginVersion": "7.2.1",
          "targets": [
            {
              "expr": "sum(increase(service_assisted_installer_cluster_validation_is_in_failed_status_on_cluster_deletion[$__range:$__rate_interval])) by (clusterValidationType)",
              "interval": "",
              "legendFormat": "{hostValidationType}}",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Cluster - On cluster deregistration",
          "type": "bargauge"
        }
      ],
      "schemaVersion": 26,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": [
          {
            "current": {
              "selected": false,
              "text": "app-sre-prod-04-prometheus",
              "value": "app-sre-prod-04-prometheus"
            },
            "hide": 0,
            "includeAll": false,
            "label": null,
            "multi": false,
            "name": "datasource",
            "options": [],
            "query": "prometheus",
            "queryValue": "",
            "refresh": 1,
            "regex": "",
            "skipUrlSync": false,
            "type": "datasource"
          }
        ]
      },
      "time": {
        "from": "now-7d",
        "to": "now"
      },
      "timepicker": {},
      "timezone": "",
      "title": "Validations",
      "uid": "validations",
      "version": 16
    }
