kind: ConfigMap
apiVersion: v1
metadata:
  name: assisted-rds-postgres
  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",
            "target": {
              "limit": 100,
              "matchAny": false,
              "tags": [],
              "type": "dashboard"
            },
            "type": "dashboard"
          }
        ]
      },
      "editable": true,
      "fiscalYearStartMonth": 0,
      "graphTooltip": 1,
      "id": 254,
      "iteration": 1647438362877,
      "links": [],
      "liveNow": false,
      "panels": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "2i4s3Wf7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 7,
            "w": 3,
            "x": 0,
            "y": 0
          },
          "id": 4,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "limit": 1,
              "values": false
            },
            "textMode": "name"
          },
          "pluginVersion": "8.4.1",
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "2i4s3Wf7k"
              },
              "exemplar": true,
              "expr": "aws_resources_exporter_rds_engineversion{dbinstance_identifier=\"${instance}\"}",
              "interval": "",
              "legendFormat": "{{ engine_version }}",
              "refId": "A"
            }
          ],
          "title": "Engine Version",
          "type": "stat"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "2i4s3Wf7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "#EAB839",
                    "value": 0.1
                  },
                  {
                    "color": "red",
                    "value": 0.2
                  }
                ]
              },
              "unit": "s"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 7,
            "w": 4,
            "x": 3,
            "y": 0
          },
          "id": 11,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "mean"
              ],
              "fields": "",
              "values": false
            },
            "textMode": "auto"
          },
          "pluginVersion": "8.4.1",
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "2i4s3Wf7k"
              },
              "exemplar": true,
              "expr": "aws_rds_read_latency_sum{dbinstance_identifier=\"${instance}\"}",
              "interval": "",
              "legendFormat": "Read",
              "refId": "A"
            }
          ],
          "title": "Read Latency",
          "type": "stat"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "2i4s3Wf7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "#EAB839",
                    "value": 0.1
                  },
                  {
                    "color": "red",
                    "value": 0.2
                  }
                ]
              },
              "unit": "s"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 7,
            "w": 4,
            "x": 7,
            "y": 0
          },
          "id": 12,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "mean"
              ],
              "fields": "",
              "values": false
            },
            "textMode": "auto"
          },
          "pluginVersion": "8.4.1",
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "2i4s3Wf7k"
              },
              "exemplar": true,
              "expr": "aws_rds_write_latency_sum{dbinstance_identifier=\"${instance}\"}",
              "interval": "",
              "legendFormat": "Read",
              "refId": "A"
            }
          ],
          "title": "Write Latency",
          "type": "stat"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "2i4s3Wf7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "#EAB839",
                    "value": 30
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 7,
            "w": 4,
            "x": 11,
            "y": 0
          },
          "id": 2,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "textMode": "auto"
          },
          "pluginVersion": "8.4.1",
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "2i4s3Wf7k"
              },
              "exemplar": true,
              "expr": "aws_rds_database_connections_sum{dbinstance_identifier=\"${instance}\"}",
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "title": "Connections",
          "type": "stat"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "2i4s3Wf7k"
          },
          "description": "How long ago last backup has been taken",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "#EAB839",
                    "value": 86400
                  },
                  {
                    "color": "red",
                    "value": 172800
                  }
                ]
              },
              "unit": "s"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 7,
            "w": 3,
            "x": 15,
            "y": 0
          },
          "id": 20,
          "options": {
            "colorMode": "value",
            "graphMode": "none",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "limit": 1,
              "values": false
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "8.4.1",
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "2i4s3Wf7k"
              },
              "exemplar": true,
              "expr": "(time() - aws_resources_exporter_rds_latestrestorabletime{dbinstance_identifier=\"${instance}\"})",
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "title": "Last backup",
          "type": "stat"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "2i4s3Wf7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 10,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "percent"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 7
          },
          "id": 6,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "2i4s3Wf7k"
              },
              "exemplar": true,
              "expr": "aws_rds_cpuutilization_maximum{dbinstance_identifier=\"${instance}\"}",
              "interval": "",
              "legendFormat": "CPU Utilization",
              "refId": "A"
            }
          ],
          "title": "CPU Utilization",
          "type": "timeseries"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "2i4s3Wf7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 10,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "bytes"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 7
          },
          "id": 8,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "2i4s3Wf7k"
              },
              "exemplar": true,
              "expr": "aws_rds_freeable_memory_sum{dbinstance_identifier=\"${instance}\"}",
              "interval": "",
              "legendFormat": "Freeable memory",
              "refId": "A"
            }
          ],
          "title": "Available memory",
          "type": "timeseries"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "2i4s3Wf7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 10,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "log": 2,
                  "type": "log"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "max connections"
                },
                "properties": [
                  {
                    "id": "custom.fillOpacity",
                    "value": 0
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 15
          },
          "id": 16,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "2i4s3Wf7k"
              },
              "exemplar": true,
              "expr": "aws_rds_database_connections_sum{dbinstance_identifier=\"${instance}\"}",
              "interval": "",
              "legendFormat": "connections",
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "2i4s3Wf7k"
              },
              "exemplar": true,
              "expr": "aws_resources_exporter_rds_maxconnections{dbinstance_identifier=\"${instance}\"}",
              "hide": false,
              "interval": "",
              "legendFormat": "max connections",
              "refId": "B"
            }
          ],
          "title": "Connections",
          "type": "timeseries"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "2i4s3Wf7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 10,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "s"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 15
          },
          "id": 10,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "2i4s3Wf7k"
              },
              "exemplar": true,
              "expr": "aws_rds_read_latency_sum{dbinstance_identifier=\"${instance}\"}",
              "interval": "",
              "legendFormat": "Read",
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "2i4s3Wf7k"
              },
              "exemplar": true,
              "expr": "aws_rds_write_latency_sum{dbinstance_identifier=\"${instance}\"}",
              "hide": false,
              "interval": "",
              "legendFormat": "Write",
              "refId": "B"
            }
          ],
          "title": "Latency",
          "type": "timeseries"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "2i4s3Wf7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 10,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "bytes"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 23
          },
          "id": 14,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "2i4s3Wf7k"
              },
              "exemplar": true,
              "expr": "aws_rds_free_storage_space_sum{dbinstance_identifier=\"${instance}\"}",
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "title": "Free storage space",
          "type": "timeseries"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "2i4s3Wf7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 10,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 23
          },
          "id": 18,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "2i4s3Wf7k"
              },
              "exemplar": true,
              "expr": "aws_rds_read_iops_average{dbinstance_identifier=\"${instance}\"}",
              "interval": "",
              "legendFormat": "Read IOPS",
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "2i4s3Wf7k"
              },
              "exemplar": true,
              "expr": "aws_rds_write_iops_average{dbinstance_identifier=\"${instance}\"}",
              "hide": false,
              "interval": "",
              "legendFormat": "write IOPS",
              "refId": "B"
            }
          ],
          "title": "IOPS",
          "type": "timeseries"
        }
      ],
      "refresh": "",
      "schemaVersion": 35,
      "style": "dark",
      "tags": [],
      "templating": {
        "list": [
          {
            "current": {
              "selected": true,
              "text": "assisted-installer",
              "value": "assisted-installer"
            },
            "datasource": {
              "type": "prometheus",
              "uid": "2i4s3Wf7k"
            },
            "definition": "label_values(dbinstance_identifier)",
            "hide": 0,
            "includeAll": false,
            "label": "instance",
            "multi": false,
            "name": "instance",
            "options": [],
            "query": {
              "query": "label_values(dbinstance_identifier)",
              "refId": "StandardVariableQuery"
            },
            "refresh": 1,
            "regex": "/^assisted-installer.*/",
            "skipUrlSync": false,
            "sort": 0,
            "type": "query"
          }
        ]
      },
      "time": {
        "from": "now-1h",
        "to": "now"
      },
      "timepicker": {},
      "timezone": "",
      "title": "RDS Postgres",
      "uid": "ezEQIcPnk",
      "version": 17,
      "weekStart": ""
    }
