Grafana dashboard: API Gateway
Description: AWS API Gateway

This dashboard shows the API Gateway metrics from CloudWatch.

Text panel
Graph Panel
Permission to read CloudWatch metrics from AWS
Note: The dashboard uses CloudWatch queries to fetch metrics. This incurs cost on the AWS account, so it is advised to set a higher refresh interval on the dashboard.

Source: https://github.com/praveenchandran/grafana

{
  "__inputs": [
    {
      "name": "DS_CLOUDWATCH",
      "label": "CloudWatch",
      "description": "AWS CloudWatch Datasource",
      "type": "datasource",
      "pluginId": "cloudwatch",
      "pluginName": "CloudWatch"
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "datasource",
      "id": "cloudwatch",
      "name": "CloudWatch",
      "version": "1.0.0"
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.5.0"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph (old)",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "uid": "grafana"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "AWS API Gateway",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1651612369719,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "uid": "$datasource"
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 11,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.5.0",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "dimensions": {
            "ApiName": "$api"
          },
          "expression": "",
          "id": "total",
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "Count",
          "metricQueryType": 0,
          "namespace": "AWS/ApiGateway",
          "period": "",
          "refId": "A",
          "region": "$region",
          "statistic": "Sum",
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          }
        },
        {
          "alias": "",
          "dimensions": {
            "ApiName": "$api"
          },
          "expression": "",
          "id": "error4xx",
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "4XXError",
          "metricQueryType": 0,
          "namespace": "AWS/ApiGateway",
          "period": "",
          "refId": "B",
          "region": "$region",
          "statistic": "Sum",
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          }
        },
        {
          "alias": "",
          "dimensions": {
            "ApiName": "$api"
          },
          "expression": "",
          "id": "error5xx",
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "5XXError",
          "metricQueryType": 0,
          "namespace": "AWS/ApiGateway",
          "period": "",
          "refId": "C",
          "region": "$region",
          "statistic": "Sum",
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          }
        },
        {
          "alias": "Error Rate %",
          "dimensions": {},
          "expression": "SUM([error4xx, error5xx]) *100/total",
          "id": "error",
          "matchExact": true,
          "metricEditorMode": 1,
          "metricName": "",
          "metricQueryType": 0,
          "namespace": "",
          "period": "",
          "refId": "D",
          "region": "$region",
          "statistic": "Average",
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          }
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Requests",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:661",
          "format": "short",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:662",
          "format": "percent",
          "label": "Percentage",
          "logBase": 1,
          "min": "0",
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "uid": "$datasource"
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 11
      },
      "hiddenSeries": false,
      "id": 4,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.5.0",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "dimensions": {
            "ApiName": "$api"
          },
          "expression": "",
          "id": "",
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "CacheHitCount",
          "metricQueryType": 0,
          "namespace": "AWS/ApiGateway",
          "period": "",
          "refId": "A",
          "region": "$region",
          "statistic": "Sum",
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          }
        },
        {
          "alias": "",
          "dimensions": {
            "ApiName": "$api"
          },
          "expression": "",
          "id": "",
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "CacheMissCount",
          "metricQueryType": 0,
          "namespace": "AWS/ApiGateway",
          "period": "",
          "refId": "B",
          "region": "$region",
          "statistic": "Sum",
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          }
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Cache Hit vs Miss",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:724",
          "format": "short",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:725",
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "uid": "$datasource"
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 11
      },
      "hiddenSeries": false,
      "id": 6,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.5.0",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "dimensions": {
            "ApiName": "$api"
          },
          "expression": "",
          "id": "",
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "IntegrationLatency",
          "metricQueryType": 0,
          "namespace": "AWS/ApiGateway",
          "period": "",
          "refId": "A",
          "region": "$region",
          "statistic": "Average",
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          }
        },
        {
          "alias": "",
          "dimensions": {
            "ApiName": "$api"
          },
          "expression": "",
          "id": "",
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "Latency",
          "metricQueryType": 0,
          "namespace": "AWS/ApiGateway",
          "period": "",
          "refId": "B",
          "region": "$region",
          "statistic": "Average",
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          }
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Latency",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:815",
          "format": "ms",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:816",
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "description": "",
      "gridPos": {
        "h": 2,
        "w": 24,
        "x": 0,
        "y": 49
      },
      "id": 26,
      "options": {
        "content": "\n<a href=\"https://github.com/praveenchandran/grafana\" target=\"_blank\"/>Github Repo</a> | \n<a target=\"_blank\" href=\"https://github.com/praveenchandran\">Author</a> |\n<a target=\"_blank\" href=\"https://grafana.com/dashboards/16206\">Download link</a> |\n<a target=\"_blank\" href=\"https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-metrics-and-dimensions.html\">AWS Cloudwatch documentation</a>",
        "mode": "html"
      },
      "pluginVersion": "8.4.5",
      "title": "Documentation",
      "type": "text"
    }
  ],
  "schemaVersion": 36,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {},
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "datasource",
        "options": [],
        "query": "cloudwatch",
        "queryValue": "",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "current": {},
        "datasource": {
          "uid": "$datasource"
        },
        "definition": "regions()",
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "region",
        "options": [],
        "query": "regions()",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "uid": "$datasource"
        },
        "definition": "dimension_values($region, AWS/ApiGateway, Count, ApiName)",
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "api",
        "options": [],
        "query": "dimension_values($region, AWS/ApiGateway, Count, ApiName)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-12h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "API Gateway",
  "uid": "mV37eGl7k",
  "version": 1,
  "weekStart": "",
  "gnetId": 16206
}