{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "panels": [
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "cloudwatch"
      },
      "gridPos": {
        "h": 3,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 1,
      "options": {
        "content": "<b>AWS CloudWatch overview</b><br/>Region: ap-east-1 (Hong Kong)<br/>RDS DBInstanceIdentifier: hifast-mysql-prod-v2<br/>Redis: current production uses a local Docker Redis container (<code>hifast-redis</code>) on EC2 rather than AWS ElastiCache.<br/><br/>This dashboard keeps the RDS CloudWatch panels. Redis should be observed from the local ops dashboard via Prometheus/cAdvisor instead of ElastiCache metrics.",
        "mode": "html"
      },
      "pluginVersion": "11.0.0",
      "title": "Read Me",
      "type": "text"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "cloudwatch"
      },
      "fieldConfig": {
        "defaults": {
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 0,
        "y": 3
      },
      "id": 2,
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "cloudwatch"
          },
          "dimensions": {
            "DBInstanceIdentifier": "hifast-mysql-prod-v2"
          },
          "metricName": "CPUUtilization",
          "namespace": "AWS/RDS",
          "period": "",
          "refId": "A",
          "region": "ap-east-1",
          "statistic": "Average"
        }
      ],
      "title": "RDS CPU",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "cloudwatch"
      },
      "fieldConfig": {
        "defaults": {
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 8,
        "y": 3
      },
      "id": 3,
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "cloudwatch"
          },
          "dimensions": {
            "DBInstanceIdentifier": "hifast-mysql-prod-v2"
          },
          "metricName": "DatabaseConnections",
          "namespace": "AWS/RDS",
          "period": "",
          "refId": "A",
          "region": "ap-east-1",
          "statistic": "Average"
        }
      ],
      "title": "RDS Connections",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "cloudwatch"
      },
      "fieldConfig": {
        "defaults": {
          "unit": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 16,
        "y": 3
      },
      "id": 4,
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "cloudwatch"
          },
          "dimensions": {
            "DBInstanceIdentifier": "hifast-mysql-prod-v2"
          },
          "metricName": "FreeStorageSpace",
          "namespace": "AWS/RDS",
          "period": "",
          "refId": "A",
          "region": "ap-east-1",
          "statistic": "Minimum"
        }
      ],
      "title": "RDS Free Storage",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "cloudwatch"
      },
      "fieldConfig": {
        "defaults": {
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 11
      },
      "id": 5,
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "cloudwatch"
          },
          "dimensions": {
            "DBInstanceIdentifier": "hifast-mysql-prod-v2"
          },
          "metricName": "ReadLatency",
          "namespace": "AWS/RDS",
          "period": "",
          "refId": "A",
          "region": "ap-east-1",
          "statistic": "Average"
        },
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "cloudwatch"
          },
          "dimensions": {
            "DBInstanceIdentifier": "hifast-mysql-prod-v2"
          },
          "metricName": "WriteLatency",
          "namespace": "AWS/RDS",
          "period": "",
          "refId": "B",
          "region": "ap-east-1",
          "statistic": "Average"
        }
      ],
      "title": "RDS Read / Write Latency",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "cloudwatch"
      },
      "fieldConfig": {
        "defaults": {
          "unit": "iops"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 11
      },
      "id": 6,
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "cloudwatch"
          },
          "dimensions": {
            "DBInstanceIdentifier": "hifast-mysql-prod-v2"
          },
          "metricName": "ReadIOPS",
          "namespace": "AWS/RDS",
          "period": "",
          "refId": "A",
          "region": "ap-east-1",
          "statistic": "Average"
        },
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "cloudwatch"
          },
          "dimensions": {
            "DBInstanceIdentifier": "hifast-mysql-prod-v2"
          },
          "metricName": "WriteIOPS",
          "namespace": "AWS/RDS",
          "period": "",
          "refId": "B",
          "region": "ap-east-1",
          "statistic": "Average"
        }
      ],
      "title": "RDS Read / Write IOPS",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "cloudwatch"
      },
      "fieldConfig": {
        "defaults": {
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 0,
        "y": 19
      },
      "id": 7,
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "cloudwatch"
          },
          "dimensions": {
            "ReplicationGroupId": "hifastapp-redis"
          },
          "metricName": "CPUUtilization",
          "namespace": "AWS/ElastiCache",
          "period": "",
          "refId": "A",
          "region": "ap-east-1",
          "statistic": "Average"
        }
      ],
      "title": "Redis Host CPU (Legacy ElastiCache)",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "cloudwatch"
      },
      "fieldConfig": {
        "defaults": {
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 6,
        "y": 19
      },
      "id": 8,
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "cloudwatch"
          },
          "dimensions": {
            "ReplicationGroupId": "hifastapp-redis"
          },
          "metricName": "EngineCPUUtilization",
          "namespace": "AWS/ElastiCache",
          "period": "",
          "refId": "A",
          "region": "ap-east-1",
          "statistic": "Average"
        }
      ],
      "title": "Redis Engine CPU (Legacy ElastiCache)",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "cloudwatch"
      },
      "fieldConfig": {
        "defaults": {
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 12,
        "y": 19
      },
      "id": 9,
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "cloudwatch"
          },
          "dimensions": {
            "ReplicationGroupId": "hifastapp-redis"
          },
          "metricName": "CurrConnections",
          "namespace": "AWS/ElastiCache",
          "period": "",
          "refId": "A",
          "region": "ap-east-1",
          "statistic": "Average"
        }
      ],
      "title": "Redis Connections (Legacy ElastiCache)",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "cloudwatch"
      },
      "fieldConfig": {
        "defaults": {
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 18,
        "y": 19
      },
      "id": 10,
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "cloudwatch"
          },
          "dimensions": {
            "ReplicationGroupId": "hifastapp-redis"
          },
          "metricName": "DatabaseMemoryUsagePercentage",
          "namespace": "AWS/ElastiCache",
          "period": "",
          "refId": "A",
          "region": "ap-east-1",
          "statistic": "Average"
        }
      ],
      "title": "Redis Memory Usage % (Legacy ElastiCache)",
      "type": "timeseries"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 39,
  "style": "dark",
  "tags": [
    "aws",
    "cloudwatch",
    "rds",
    "redis"
  ],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "browser",
  "title": "AWS RDS & Redis Overview",
  "uid": "aws-rds-redis-overview",
  "version": 1,
  "weekStart": ""
}
