Skip to content

Commit

Permalink
fix alloy-logs dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
hervenicol committed Jan 21, 2025
1 parent 4c4dbe0 commit 25cb9e0
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Update DNS dashboard to include memory requests.
- fix Alloy / Logs Overview dashboard.

## [3.28.0] - 2025-01-13

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
{
"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": 26,
"links": [
{
"asDropdown": true,
Expand All @@ -22,13 +42,56 @@
"description": "Logs volume grouped by \"level\" label.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "bars",
"fillOpacity": 50,
"gradientMode": "none",
"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": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": [
Expand Down Expand Up @@ -141,25 +204,36 @@
},
"gridPos": {
"h": 6,
"w": 24
"w": 24,
"x": 0,
"y": 0
},
"id": 1,
"interval": "30s",
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"pluginVersion": "v10.0.0",
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${loki_datasource}"
},
"expr": "sum by (level) (count_over_time({,cluster=~\"$cluster\",namespace=~\"$namespace\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\"}\n|~ \"$regex_search\"\n\n[$__interval]))\n",
"legendFormat": "{{ level }}"
"editorMode": "code",
"expr": "sum by (level) (\n count_over_time(\n {\n cluster_id=~\"$cluster\",\n namespace=~\"$namespace\",\n scrape_job=~\"$job\",\n instance=~\"$instance\",\n level=~\"$level\"\n }\n |~ \"$regex_search\"\n [$__interval]\n )\n)\n",
"legendFormat": "{{ level }}",
"queryType": "range",
"refId": "A"
}
],
"title": "Logs volume",
Expand All @@ -179,34 +253,47 @@
"type": "datasource",
"uid": "-- Mixed --"
},
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 18,
"w": 24
"w": 24,
"x": 0,
"y": 6
},
"id": 2,
"options": {
"dedupStrategy": "exact",
"enableLogDetails": true,
"prettifyLogMessage": true,
"showCommonLabels": false,
"showLabels": false,
"showTime": false,
"sortOrder": "Descending",
"wrapLogMessage": true
},
"pluginVersion": "v10.0.0",
"pluginVersion": "11.3.1",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${loki_datasource}"
},
"expr": "{,cluster=~\"$cluster\",namespace=~\"$namespace\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\"} \n|~ \"$regex_search\"\n\n\n"
"editorMode": "code",
"expr": "{\n cluster_id=~\"$cluster\",\n namespace=~\"$namespace\",\n scrape_job=~\"$job\",\n instance=~\"$instance\",\n level=~\"$level\"\n} \n|~ \"$regex_search\"\n\n\n",
"queryType": "range",
"refId": "A"
}
],
"title": "Logs",
"type": "logs"
}
],
"preload": false,
"refresh": "10s",
"schemaVersion": 36,
"schemaVersion": 40,
"tags": [
"alloy-mixin",
"owner:team-atlas",
Expand All @@ -219,6 +306,7 @@
"label": "Loki data source",
"name": "loki_datasource",
"query": "loki",
"refresh": 1,
"regex": "",
"type": "datasource"
},
Expand All @@ -228,11 +316,17 @@
"type": "loki",
"uid": "${loki_datasource}"
},
"definition": "",
"includeAll": true,
"label": "Cluster",
"multi": true,
"name": "cluster",
"query": "label_values({}, cluster)",
"query": {
"label": "cluster_id",
"refId": "LokiVariableQueryEditor-VariableQuery",
"stream": "{}",
"type": 1
},
"refresh": 2,
"sort": 1,
"type": "query"
Expand All @@ -243,11 +337,17 @@
"type": "loki",
"uid": "${loki_datasource}"
},
"definition": "",
"includeAll": true,
"label": "Namespace",
"multi": true,
"name": "namespace",
"query": "label_values({,cluster=~\"$cluster\"}, namespace)",
"query": {
"label": "namespace",
"refId": "LokiVariableQueryEditor-VariableQuery",
"stream": "{cluster_id=~\"$cluster\"}",
"type": 1
},
"refresh": 2,
"sort": 1,
"type": "query"
Expand All @@ -258,11 +358,17 @@
"type": "loki",
"uid": "${loki_datasource}"
},
"definition": "",
"includeAll": true,
"label": "Job",
"multi": true,
"name": "job",
"query": "label_values({,cluster=~\"$cluster\",namespace=~\"$namespace\"}, job)",
"query": {
"label": "scrape_job",
"refId": "LokiVariableQueryEditor-VariableQuery",
"stream": "{cluster_id=~\"$cluster\",namespace=~\"$namespace\"}",
"type": 1
},
"refresh": 2,
"sort": 1,
"type": "query"
Expand All @@ -273,11 +379,17 @@
"type": "loki",
"uid": "${loki_datasource}"
},
"definition": "",
"includeAll": true,
"label": "Instance",
"multi": true,
"name": "instance",
"query": "label_values({,cluster=~\"$cluster\",namespace=~\"$namespace\",job=~\"$job\"}, instance)",
"query": {
"label": "instance",
"refId": "LokiVariableQueryEditor-VariableQuery",
"stream": "{cluster_id=~\"$cluster\",namespace=~\"$namespace\",scrape_job=~\"$job\"}",
"type": 1
},
"refresh": 2,
"sort": 1,
"type": "query"
Expand All @@ -288,18 +400,23 @@
"type": "loki",
"uid": "${loki_datasource}"
},
"definition": "",
"includeAll": true,
"label": "Level",
"multi": true,
"name": "level",
"query": "label_values({,cluster=~\"$cluster\",namespace=~\"$namespace\",job=~\"$job\",instance=~\"$instance\"}, level)",
"query": {
"label": "level",
"refId": "LokiVariableQueryEditor-VariableQuery",
"stream": "{cluster_id=~\"$cluster\",namespace=~\"$namespace\",scrape_job=~\"$job\",instance=~\"$instance\"}",
"type": 1
},
"refresh": 2,
"sort": 1,
"type": "query"
},
{
"current": {
"selected": false,
"text": "",
"value": ""
},
Expand All @@ -321,7 +438,10 @@
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "Alloy / Logs Overview",
"uid": "53c1ecddc3a1d5d4b8d6cd0c23676c31"
}
"uid": "53c1ecddc3a1d5d4b8d6cd0c23676c31",
"version": 1,
"weekStart": ""
}

0 comments on commit 25cb9e0

Please sign in to comment.