Skip to content

Commit

Permalink
fix dev_logs_dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
raftmsohani committed Dec 12, 2024
1 parent 5adb1e5 commit 476c4d7
Showing 1 changed file with 29 additions and 256 deletions.
285 changes: 29 additions & 256 deletions tdrs-backend/plg/grafana/dashboards/dev_logs_dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,262 +77,6 @@
"datasource": {
"type": "loki",
"uid": "L8E80F9AEF21F6940"
},{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "Dashboard allowing log visualization",
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"panels": [
{
"datasource": {
"default": true,
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "dark-red",
"value": 80
},
{
"color": "light-red",
"value": 85
},
{
"color": "#EAB839",
"value": 90
},
{
"color": "semi-dark-green",
"value": 95
},
{
"color": "dark-green",
"value": 100
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 24,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"colorMode": "background",
"graphMode": "none",
"justifyMode": "center",
"orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "100 * avg_over_time(up{job=~\"$app\"}[$__range])",
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "App Uptime",
"type": "stat"
},
{
"datasource": {
"default": false,
"type": "loki",
"uid": "L8E80F9AEF21F6940"
},
"gridPos": {
"h": 28,
"w": 24,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"dedupStrategy": "none",
"enableLogDetails": true,
"prettifyLogMessage": true,
"showCommonLabels": false,
"showLabels": false,
"showTime": false,
"sortOrder": "Descending",
"wrapLogMessage": true
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "L8E80F9AEF21F6940"
},
"editorMode": "code",
"expr": "{job=~\"$job\", level=~\"$level\"}",
"queryType": "range",
"refId": "A"
}
],
"title": "Job Logs",
"type": "logs"
}
],
"refresh": "10s",
"schemaVersion": 39,
"tags": [
"Django",
"Logs",
"Loki"
],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": {
"type": "loki",
"uid": "L8E80F9AEF21F6940"
},
"definition": "",
"description": "Filter logs by job.",
"hide": 0,
"includeAll": true,
"label": "Job",
"multi": false,
"name": "job",
"options": [],
"query": {
"label": "job",
"refId": "LokiVariableQueryEditor-VariableQuery",
"stream": "",
"type": 1
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": true,
"text": "All",
"value": "$__all"
},
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"definition": "query_result(up)",
"hide": 0,
"includeAll": true,
"label": "App",
"multi": false,
"name": "app",
"options": [],
"query": {
"qryType": 3,
"query": "query_result(up)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "/.*job=\"([^\"]+).*/",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": true,
"text": "All",
"value": "$__all"
},
"datasource": {
"type": "loki",
"uid": "L8E80F9AEF21F6940"
},
"definition": "",
"hide": 0,
"includeAll": true,
"multi": false,
"name": "level",
"options": [],
"query": {
"label": "level",
"refId": "LokiVariableQueryEditor-VariableQuery",
"stream": "",
"type": 1
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-24h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "Logs",
"uid": "cdyz6flmh0ttsx",
"version": 1,
"weekStart": ""
},
"definition": "",
"description": "Filter logs by job.",
Expand All @@ -353,6 +97,35 @@
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": false,
"text": "DEBUG",
"value": "DEBUG"
},
"datasource": {
"type": "loki",
"uid": "L8E80F9AEF21F6940"
},
"definition": "",
"hide": 0,
"includeAll": false,
"label": "level",
"multi": false,
"name": "level",
"options": [],
"query": {
"label": "level",
"refId": "LokiVariableQueryEditor-VariableQuery",
"stream": "",
"type": 1
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
Expand Down

0 comments on commit 476c4d7

Please sign in to comment.