Grafana Dashboard JSON
{
"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": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 10,
"panels": [],
"title": "Analytics",
"type": "row"
},
{
"datasource": {
"type": "grafana-athena-datasource",
"uid": "cezz0j518z1tsc"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": 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
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 18,
"x": 0,
"y": 1
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"connectionArgs": {
"catalog": "__default",
"database": "__default",
"region": "__default"
},
"datasource": {
"type": "grafana-athena-datasource",
"uid": "cezz0j518z1tsc"
},
"format": 2,
"rawSQL": "SELECT\n -- Group timestamps into 5 minute buckets\n from_unixtime(floor(to_unixtime(from_iso8601_timestamp(\"date\")) / 300) * 300) AS time,\n count(*) AS log_count\nFROM\n \"prod_logs\"\nWHERE\n partition_0 = '$year'\n AND partition_1 = '$month'\n AND partition_2 = '$day'\n AND partition_3 = '$hour'\n AND kubernetes.namespace_name = '$namespace'\n AND log LIKE '%${search_term}%'\nGROUP BY 1\nORDER BY 1 ASC",
"refId": "A"
}
],
"title": "Log Volume Over Time",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-athena-datasource",
"uid": "cezz0j518z1tsc"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 6,
"x": 18,
"y": 1
},
"id": 6,
"options": {
"displayLabels": [
"name",
"percent"
],
"legend": {
"displayMode": "list",
"placement": "right",
"showLegend": true
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "10.1.5",
"targets": [
{
"connectionArgs": {
"catalog": "__default",
"database": "__default",
"region": "__default"
},
"datasource": {
"type": "grafana-athena-datasource",
"uid": "cezz0j518z1tsc"
},
"format": 1,
"rawSQL": "SELECT\n -- Extract the 'level' from the nested JSON in the log string\n json_extract_scalar(regexp_extract(log, '(\\{.*\\})', 1), '$.level') AS level,\n count(*) AS count\nFROM\n \"prod_logs\"\nWHERE\n partition_0 = '$year'\n AND partition_1 = '$month'\n AND partition_2 = '$day'\n AND partition_3 = '$hour'\n AND kubernetes.namespace_name = '$namespace'\n AND log LIKE '%${search_term}%'\nGROUP BY 1\nORDER BY count DESC",
"refId": "A"
}
],
"title": "Log Levels",
"type": "piechart"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 9
},
"id": 8,
"panels": [],
"title": "Logs",
"type": "row"
},
{
"datasource": {
"type": "grafana-athena-datasource",
"uid": "cezz0j518z1tsc"
},
"fieldConfig": {
"defaults": {
"custom": {
"align": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "level"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "log"
},
"properties": [
{
"id": "mappings",
"value": []
}
]
},
{
"matcher": {
"id": "byRegexp",
"options": "/.*/"
},
"properties": [
{
"id": "custom.cellOptions",
"value": {
"type": "json-view"
}
}
]
}
]
},
"gridPos": {
"h": 15,
"w": 24,
"x": 0,
"y": 10
},
"id": 2,
"options": {
"cellHeight": "sm",
"footer": {
"show": false
},
"showHeader": true
},
"pluginVersion": "10.1.5",
"targets": [
{
"connectionArgs": {
"catalog": "__default",
"database": "__default",
"region": "__default"
},
"datasource": {
"type": "grafana-athena-datasource",
"uid": "cezz0j518z1tsc"
},
"format": 1,
"rawSQL": "SELECT\n \"date\",\n kubernetes.namespace_name,\n kubernetes.pod_name,\n -- Extract the 'level' so we can use it for color-coding\n json_extract_scalar(regexp_extract(log, '(\\{.*\\})', 1), '$.level') AS level,\n log\nFROM\n \"prod_logs\"\nWHERE\n partition_0 = '$year'\n AND partition_1 = '$month'\n AND partition_2 = '$day'\n AND partition_3 = '$hour'\n AND kubernetes.namespace_name = '$namespace'\n AND log LIKE '%${search_term}%'\nORDER BY\n \"date\" DESC\nLIMIT 500;",
"refId": "A"
}
],
"title": "Log Details",
"type": "table"
}
],
"schemaVersion": 37,
"style": "dark",
"tags": [
"athena",
"eks",
"logs"
],
"templating": {
"list": [
{
"current": {
"selected": true,
"text": "ai-assistant",
"value": "ai-assistant"
},
"datasource": {
"type": "grafana-athena-datasource",
"uid": "cezz0j518z1tsc"
},
"hide": 0,
"includeAll": false,
"label": "Namespace",
"multi": false,
"name": "namespace",
"options": [
{
"selected": true,
"text": "ai-assistant",
"value": "ai-assistant"
},
{
"selected": false,
"text": "default",
"value": "default"
}
],
"query": "ai-assistant,default",
"refresh": 1,
"skipUrlSync": false,
"type": "custom"
},
{
"current": {
"selected": true,
"text": "2025",
"value": "2025"
},
"hide": 0,
"label": "Year",
"multi": false,
"name": "year",
"options": [
{
"selected": true,
"text": "2025",
"value": "2025"
},
{
"selected": false,
"text": "2024",
"value": "2024"
}
],
"query": "2025,2024",
"skipUrlSync": false,
"type": "custom"
},
{
"current": {
"selected": true,
"text": "10",
"value": "10"
},
"hide": 0,
"label": "Month",
"multi": false,
"name": "month",
"options": [
{
"selected": false,
"text": "01",
"value": "01"
},
{
"selected": false,
"text": "02",
"value": "02"
},
{
"selected": false,
"text": "03",
"value": "03"
},
{
"selected": false,
"text": "04",
"value": "04"
},
{
"selected": false,
"text": "05",
"value": "05"
},
{
"selected": false,
"text": "06",
"value": "06"
},
{
"selected": false,
"text": "07",
"value": "07"
},
{
"selected": false,
"text": "08",
"value": "08"
},
{
"selected": false,
"text": "09",
"value": "09"
},
{
"selected": true,
"text": "10",
"value": "10"
},
{
"selected": false,
"text": "11",
"value": "11"
},
{
"selected": false,
"text": "12",
"value": "12"
}
],
"query": "01,02,03,04,05,06,07,08,09,10,11,12",
"skipUrlSync": false,
"type": "custom"
},
{
"current": {
"selected": true,
"text": "04",
"value": "04"
},
"hide": 0,
"label": "Day",
"multi": false,
"name": "day",
"options": [],
"query": "01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31",
"skipUrlSync": false,
"type": "custom"
},
{
"current": {
"selected": true,
"text": "03",
"value": "03"
},
"hide": 0,
"label": "Hour (UTC)",
"multi": false,
"name": "hour",
"options": [],
"query": "00,01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23",
"skipUrlSync": false,
"type": "custom"
},
{
"current": {
"text": "",
"value": ""
},
"description": "Enter a string to search for within the log message",
"hide": 0,
"label": "Search Term",
"name": "search_term",
"options": [],
"skipUrlSync": false,
"type": "textbox"
}
]
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {
"hidden": true
},
"timezone": "browser",
"title": "Enhanced EKS Log Viewer",
"uid": "enhanced-eks-log-viewer",
"version": 1
}