apiVersion: v1
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"
          }
        ]
      },
      "editable": true,
      "gnetId": null,
      "graphTooltip": 0,
      "iteration": 1623048747909,
      "links": [],
      "panels": [
        {
          "collapsed": false,
          "datasource": null,
          "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
          },
          "id": 30,
          "panels": [],
          "title": "All Clusters & Hosts",
          "type": "row"
        },
        {
          "cacheTimeout": null,
          "datasource": "$datasource",
          "fieldConfig": {
            "defaults": {
              "custom": {
                "align": "center",
                "displayMode": "auto",
                "filterable": true
              },
              "links": [],
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "light-blue",
                    "value": null
                  }
                ]
              },
              "unit": "none"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 9,
            "w": 10,
            "x": 0,
            "y": 1
          },
          "id": 31,
          "interval": null,
          "links": [],
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                  "last"
              ],
              "fields": "",
              "values": false
            },
            "textMode": "value_and_name"
          },
          "pluginVersion": "7.2.1",
          "targets": [
            {
              "format": "table",
              "group": [],
              "hide": false,
              "interval": "",
              "legendFormat": "Created clusters",
              "metricColumn": "none",
              "rawQuery": true,
              "rawSql": "select count(*) AS \"Total clusters\" from clusters where deleted_at IS NULL  ",
              "refId": "A",
              "select": [
                [
                  {
                    "params": [
                        "value"
                    ],
                    "type": "column"
                  }
                ]
              ],
              "timeColumn": "time",
              "where": [
                {
                  "name": "$__timeFilter",
                  "params": [],
                  "type": "macro"
                }
              ]
            },
            {
              "format": "table",
              "group": [],
              "hide": false,
              "metricColumn": "none",
              "rawQuery": true,
              "rawSql": "select count(*) AS \"Deregistered clusters pre delete\" from clusters where deleted_at IS not NULL  ",
              "refId": "B",
              "select": [
                [
                  {
                    "params": [
                        "value"
                    ],
                    "type": "column"
                  }
                ]
              ],
              "timeColumn": "time",
              "where": [
                {
                  "name": "$__timeFilter",
                  "params": [],
                  "type": "macro"
                }
              ]
            },
            {
              "format": "table",
              "group": [],
              "hide": false,
              "metricColumn": "none",
              "rawQuery": true,
              "rawSql": "select COUNT ( DISTINCT cluster_id\n ) as \"Clusters with hosts\" from hosts limit 1",
              "refId": "C",
              "select": [
                [
                  {
                    "params": [
                        "value"
                    ],
                    "type": "column"
                  }
                ]
              ],
              "timeColumn": "time",
              "where": [
                {
                  "name": "$__timeFilter",
                  "params": [],
                  "type": "macro"
                }
              ]
            },
            {
              "format": "table",
              "group": [],
              "metricColumn": "none",
              "rawQuery": true,
              "rawSql": "select count(*) AS \"Total hosts\" from hosts where deleted_at IS NULL  ",
              "refId": "D",
              "select": [
                [
                  {
                    "params": [
                        "value"
                    ],
                    "type": "column"
                  }
                ]
              ],
              "timeColumn": "time",
              "where": [
                {
                  "name": "$__timeFilter",
                  "params": [],
                  "type": "macro"
                }
              ]
            },
            {
              "format": "table",
              "group": [],
              "metricColumn": "none",
              "rawQuery": true,
              "rawSql": "SELECT COUNT (*)  AS \"Triggerd installation clusters\" from clusters where install_started_at != '2000-01-01T00:00:00Z'",
              "refId": "E",
              "select": [
                [
                  {
                    "params": [
                        "value"
                    ],
                    "type": "column"
                  }
                ]
              ],
              "timeColumn": "time",
              "where": [
                {
                  "name": "$__timeFilter",
                  "params": [],
                  "type": "macro"
                }
              ]
            },
            {
              "format": "table",
              "group": [],
              "hide": false,
              "metricColumn": "none",
              "rawQuery": true,
              "rawSql": "SELECT COUNT (*)  AS \"Completed installed clusters\" from clusters where install_completed_at != '2000-01-01T00:00:00Z'",
              "refId": "F",
              "select": [
                [
                  {
                    "params": [
                        "value"
                    ],
                    "type": "column"
                  }
                ]
              ],
              "timeColumn": "time",
              "where": [
                {
                  "name": "$__timeFilter",
                  "params": [],
                  "type": "macro"
                }
              ]
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Clusters & Hosts",
          "type": "stat"
        }
      ],
      "refresh": false,
      "schemaVersion": 26,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": [
          {
            "current": {
              "selected": false,
              "text": "assisted-installer-production-rds",
              "value": "assisted-installer-production-rds"
            },
            "hide": 0,
            "includeAll": false,
            "label": null,
            "multi": false,
            "name": "datasource",
            "options": [],
            "query": "postgres",
            "queryValue": "",
            "refresh": 1,
            "regex": "",
            "skipUrlSync": false,
            "type": "datasource"
          }
        ]
      },
      "time": {
        "from": "now-1y",
        "to": "now"
      },
      "timepicker": {
        "refresh_intervals": [
            "5s",
            "10s",
            "30s",
            "1m",
            "5m",
            "15m",
            "30m",
            "1h",
            "2h",
            "1d"
        ]
      },
      "timezone": "",
      "title": "Assisted service deployment status",
      "uid": "assisted-installer-deployment-status",
      "version": 1
    }
kind: ConfigMap
metadata:
  name: assisted-installer-deployment-status
  labels:
    grafana_dashboard: "true"
  annotations:
    grafana-folder: /grafana-dashboard-definitions/AssistedInstaller
