Last active
June 1, 2024 19:36
-
-
Save kimdre/a917083df09ef13af115480c2bad01eb to your computer and use it in GitHub Desktop.
Grafana Loki Logs Volume in Dashboard Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"datasource":{ | |
"type":"loki", | |
"uid":"cdgxi8l9obvgga" | |
}, | |
"fieldConfig":{ | |
"defaults":{ | |
"color":{ | |
"mode":"palette-classic" | |
}, | |
"custom":{ | |
"axisBorderShow":false, | |
"axisCenteredZero":false, | |
"axisColorMode":"text", | |
"axisLabel":"", | |
"axisPlacement":"auto", | |
"barAlignment":1, | |
"drawStyle":"bars", | |
"fillOpacity":100, | |
"gradientMode":"none", | |
"hideFrom":{ | |
"legend":false, | |
"tooltip":false, | |
"viz":false | |
}, | |
"insertNulls":false, | |
"lineInterpolation":"stepBefore", | |
"lineWidth":1, | |
"pointSize":5, | |
"scaleDistribution":{ | |
"type":"linear" | |
}, | |
"showPoints":"never", | |
"spanNulls":false, | |
"stacking":{ | |
"group":"A", | |
"mode":"normal" | |
}, | |
"thresholdsStyle":{ | |
"mode":"off" | |
} | |
}, | |
"mappings":[ | |
], | |
"thresholds":{ | |
"mode":"absolute", | |
"steps":[ | |
{ | |
"color":"green", | |
"value":null | |
} | |
] | |
} | |
}, | |
"overrides":[ | |
{ | |
"matcher":{ | |
"id":"byName", | |
"options":"error" | |
}, | |
"properties":[ | |
{ | |
"id":"color", | |
"value":{ | |
"fixedColor":"#ee4f45", | |
"mode":"fixed" | |
} | |
} | |
] | |
}, | |
{ | |
"matcher":{ | |
"id":"byName", | |
"options":"warn" | |
}, | |
"properties":[ | |
{ | |
"id":"color", | |
"value":{ | |
"fixedColor":"#f1b74d", | |
"mode":"fixed" | |
} | |
} | |
] | |
}, | |
{ | |
"matcher":{ | |
"id":"byName", | |
"options":"info" | |
}, | |
"properties":[ | |
{ | |
"id":"color", | |
"value":{ | |
"fixedColor":"#76b173", | |
"mode":"fixed" | |
} | |
} | |
] | |
} | |
] | |
}, | |
"gridPos":{ | |
"h":7, | |
"w":24, | |
"x":0, | |
"y":0 | |
}, | |
"id":3, | |
"interval":"1m", | |
"options":{ | |
"legend":{ | |
"calcs":[ | |
"sum" | |
], | |
"displayMode":"list", | |
"placement":"bottom", | |
"showLegend":true | |
}, | |
"tooltip":{ | |
"mode":"multi", | |
"sort":"none" | |
} | |
}, | |
"targets":[ | |
{ | |
"datasource":{ | |
"type":"loki", | |
"uid":"cdgxi8l9obvgga" | |
}, | |
"editorMode":"code", | |
"expr":"sum by(level) (count_over_time({swarm_stack=\"app\"} | logfmt [$__auto]))", | |
"legendFormat":"{{level}}", | |
"queryType":"range", | |
"refId":"A", | |
"step":"" | |
} | |
], | |
"title":"Logs Volume", | |
"type":"timeseries" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment