{ "title": "Tadrisino Django Logs", "uid": "tadrisino-django-logs", "timezone": "browser", "schemaVersion": 39, "version": 1, "time": { "from": "now-6h", "to": "now" }, "refresh": "10s", "templating": { "list": [ { "name": "level", "type": "query", "datasource": { "type": "loki", "uid": "Loki" }, "query": "label_values({job=\"django\"}, level)", "refresh": 2, "includeAll": true, "multi": true, "current": { "text": "All", "value": "$__all" } }, { "name": "search", "type": "textbox", "label": "Search text", "current": { "text": "", "value": "" } } ] }, "panels": [ { "id": 1, "title": "Log volume by level", "type": "timeseries", "datasource": { "type": "loki", "uid": "Loki" }, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 0 }, "targets": [ { "expr": "sum by (level) (count_over_time({job=\"django\", level=~\"$level\"} |= `$search` [1m]))", "refId": "A" } ] }, { "id": 2, "title": "Django application logs", "type": "logs", "datasource": { "type": "loki", "uid": "Loki" }, "gridPos": { "h": 16, "w": 24, "x": 0, "y": 8 }, "options": { "showTime": true, "showLabels": true, "wrapLogMessage": true, "sortOrder": "Descending" }, "targets": [ { "expr": "{job=\"django\", level=~\"$level\"} |= `$search`", "refId": "A" } ] } ] }