Skip to content

Commit

Permalink
BAU-POC Sample dashboard to demonstrate cloudwatch aggregation functi…
Browse files Browse the repository at this point in the history
…ons (#758)

- Target 5xx status code for this example
  • Loading branch information
webit4me authored Oct 16, 2024
1 parent ade4bc6 commit c7bd0b0
Showing 1 changed file with 336 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,336 @@
{
"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": 17,
"links": [],
"panels": [
{
"datasource": {
"default": true,
"type": "cloudwatch",
"uid": "CLOUDWATCH"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"fieldMinMax": true,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 12,
"w": 24,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"displayMode": "lcd",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [],
"fields": "/^status_5xx_count$/",
"values": true
},
"showUnfilled": true,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
"type": "cloudwatch",
"uid": "CLOUDWATCH"
},
"dimensions": {},
"expression": "filter StatusCode > 499\n| stats count(StatusCode) as status_5xx_count by @log as log_group, Path as path\n| sort status_5xx_count desc\n\n\n\n\n",
"id": "",
"label": "",
"logGroups": [
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/authority:*",
"name": "/ecs/authority"
},
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/data-sharing:*",
"name": "/ecs/data-sharing"
},
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/entity-verification:*",
"name": "/ecs/entity-verification"
},
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/forms:*",
"name": "/ecs/forms"
},
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/organisation:*",
"name": "/ecs/organisation"
},
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/organisation-app:*",
"name": "/ecs/organisation-app"
},
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/person:*",
"name": "/ecs/person"
},
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/tenant:*",
"name": "/ecs/tenant"
}
],
"matchExact": true,
"metricEditorMode": 0,
"metricName": "",
"metricQueryType": 0,
"namespace": "",
"period": "",
"queryMode": "Logs",
"refId": "A",
"region": "default",
"sqlExpression": "",
"statistic": "Average",
"statsGroups": [
"log_group",
"path"
]
}
],
"title": "5xx Status",
"transparent": true,
"type": "bargauge"
},
{
"datasource": {
"default": true,
"type": "cloudwatch",
"uid": "CLOUDWATCH"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"align": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": true
},
"fieldMinMax": false,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 2
},
{
"color": "#EAB839",
"value": 8
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "log_group"
},
"properties": [
{
"id": "custom.width",
"value": 300
}
]
},
{
"matcher": {
"id": "byName",
"options": "status_code"
},
"properties": [
{
"id": "custom.width",
"value": 142
}
]
},
{
"matcher": {
"id": "byName",
"options": "path"
},
"properties": [
{
"id": "custom.width",
"value": 1723
}
]
}
]
},
"gridPos": {
"h": 21,
"w": 24,
"x": 0,
"y": 12
},
"id": 1,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"enablePagination": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true,
"sortBy": []
},
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
"type": "cloudwatch",
"uid": "CLOUDWATCH"
},
"dimensions": {},
"expression": "filter StatusCode > 499\n| stats count(StatusCode) as status_5xx_count by @log as log_group, Path as path, StatusCode as status_code\n| sort status_5xx_count desc\n\n\n\n\n\n",
"id": "",
"label": "",
"logGroups": [
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/authority:*",
"name": "/ecs/authority"
},
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/data-sharing:*",
"name": "/ecs/data-sharing"
},
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/entity-verification:*",
"name": "/ecs/entity-verification"
},
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/forms:*",
"name": "/ecs/forms"
},
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/organisation:*",
"name": "/ecs/organisation"
},
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/organisation-app:*",
"name": "/ecs/organisation-app"
},
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/person:*",
"name": "/ecs/person"
},
{
"accountId": "905418042182",
"arn": "arn:aws:logs:eu-west-2:GRAFANA_CLOUDWATCH_ACCOUNT_ID:log-group:/ecs/tenant:*",
"name": "/ecs/tenant"
}
],
"matchExact": true,
"metricEditorMode": 0,
"metricName": "",
"metricQueryType": 0,
"namespace": "",
"period": "",
"queryMode": "Logs",
"refId": "A",
"region": "default",
"sqlExpression": "",
"statistic": "Average",
"statsGroups": [
"log_group",
"path",
"status_code"
]
}
],
"title": "5xx Breakdown",
"transparent": true,
"type": "table"
}
],
"refresh": "",
"schemaVersion": 39,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-7d",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "5xx Across All Services",
"uid": "de0yee1n9c6bkb",
"version": 10,
"weekStart": ""
}

0 comments on commit c7bd0b0

Please sign in to comment.