# HG changeset patch # User Kim Alvefur # Date 1701101775 -3600 # Node ID 7e6bf0a5aef21dd17e2b72d5f0aabdd50e1af1be # Parent 06ecadfe95e881108da5363cc14ef9de3b6a72f4 misc: Add a basic grafterm dashboard For those of us who would rather have less JavaScript diff -r 06ecadfe95e8 -r 7e6bf0a5aef2 misc/grafterm/dashboard.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/misc/grafterm/dashboard.json Mon Nov 27 17:16:15 2023 +0100 @@ -0,0 +1,121 @@ +{ + "version": "v1", + "datasources": { + "prometheus": { + "prometheus": { + "address": "http://127.0.0.1:9090" + } + } + }, + "dashboard": { + "variables": { + "job": { + "constant": { + "value": "prosody" + } + } + }, + "widgets": [ + { + "title": "CPU", + "gridPos": { + "w": 50 + }, + "graph": { + "visualization": { + "yAxis": { + "unit": "percent", + "decimals": 2 + } + }, + "queries": [ + { + "datasourceID": "prometheus", + "expr": "rate(process_cpu_seconds_total{job=\"{{.job}}\"}[5m])", + "legend": "CPU" + } + ] + } + }, + { + "title": "Memory", + "gridPos": { + "w": 50 + }, + "graph": { + "visualization": { + "yAxis": { + "unit": "bytes" + } + }, + "queries": [ + { + "datasourceID": "prometheus", + "expr": "max_over_time(process_resident_memory_bytes{job=\"{{.job}}\"}[5m])", + "legend": "RSS" + }, + { + "datasourceID": "prometheus", + "expr": "max_over_time(malloc_heap_used_bytes{job=\"{{.job}}\"}[5m])", + "legend": "Malloc" + }, + { + "datasourceID": "prometheus", + "expr": "max_over_time(lua_heap_bytes{job=\"{{.job}}\"}[5m])", + "legend": "Lua" + } + ] + } + }, + { + "title": "C2S", + "gridPos": { + "x": 50, + "w": 50 + }, + "graph": { + "visualization": { + "yAxis": { + "unit": "none", + "decimals": 0 + } + }, + "queries": [ + { + "datasourceID": "prometheus", + "expr": "sum(prosody_mod_c2s__connections{type=\"c2s\",job=\"{{.job}}\"})", + "legend": "c2s" + } + ] + } + }, + { + "title": "S2S", + "gridPos": { + "x": 50, + "w": 50 + }, + "graph": { + "visualization": { + "yAxis": { + "unit": "none", + "decimals": 0 + } + }, + "queries": [ + { + "datasourceID": "prometheus", + "expr": "sum(prosody_mod_s2s__connections_inbound{type=\"s2sin\",job=\"{{.job}}\"})", + "legend": "s2sin" + }, + { + "datasourceID": "prometheus", + "expr": "sum(prosody_mod_s2s__connections_outbound{type=\"s2sout\",job=\"{{.job}}\"})", + "legend": "s2sout" + } + ] + } + } + ] + } +}