comparison misc/grafterm/dashboard.json @ 5739:7e6bf0a5aef2

misc: Add a basic grafterm dashboard For those of us who would rather have less JavaScript
author Kim Alvefur <zash@zash.se>
date Mon, 27 Nov 2023 17:16:15 +0100
parents
children
comparison
equal deleted inserted replaced
5738:06ecadfe95e8 5739:7e6bf0a5aef2
1 {
2 "version": "v1",
3 "datasources": {
4 "prometheus": {
5 "prometheus": {
6 "address": "http://127.0.0.1:9090"
7 }
8 }
9 },
10 "dashboard": {
11 "variables": {
12 "job": {
13 "constant": {
14 "value": "prosody"
15 }
16 }
17 },
18 "widgets": [
19 {
20 "title": "CPU",
21 "gridPos": {
22 "w": 50
23 },
24 "graph": {
25 "visualization": {
26 "yAxis": {
27 "unit": "percent",
28 "decimals": 2
29 }
30 },
31 "queries": [
32 {
33 "datasourceID": "prometheus",
34 "expr": "rate(process_cpu_seconds_total{job=\"{{.job}}\"}[5m])",
35 "legend": "CPU"
36 }
37 ]
38 }
39 },
40 {
41 "title": "Memory",
42 "gridPos": {
43 "w": 50
44 },
45 "graph": {
46 "visualization": {
47 "yAxis": {
48 "unit": "bytes"
49 }
50 },
51 "queries": [
52 {
53 "datasourceID": "prometheus",
54 "expr": "max_over_time(process_resident_memory_bytes{job=\"{{.job}}\"}[5m])",
55 "legend": "RSS"
56 },
57 {
58 "datasourceID": "prometheus",
59 "expr": "max_over_time(malloc_heap_used_bytes{job=\"{{.job}}\"}[5m])",
60 "legend": "Malloc"
61 },
62 {
63 "datasourceID": "prometheus",
64 "expr": "max_over_time(lua_heap_bytes{job=\"{{.job}}\"}[5m])",
65 "legend": "Lua"
66 }
67 ]
68 }
69 },
70 {
71 "title": "C2S",
72 "gridPos": {
73 "x": 50,
74 "w": 50
75 },
76 "graph": {
77 "visualization": {
78 "yAxis": {
79 "unit": "none",
80 "decimals": 0
81 }
82 },
83 "queries": [
84 {
85 "datasourceID": "prometheus",
86 "expr": "sum(prosody_mod_c2s__connections{type=\"c2s\",job=\"{{.job}}\"})",
87 "legend": "c2s"
88 }
89 ]
90 }
91 },
92 {
93 "title": "S2S",
94 "gridPos": {
95 "x": 50,
96 "w": 50
97 },
98 "graph": {
99 "visualization": {
100 "yAxis": {
101 "unit": "none",
102 "decimals": 0
103 }
104 },
105 "queries": [
106 {
107 "datasourceID": "prometheus",
108 "expr": "sum(prosody_mod_s2s__connections_inbound{type=\"s2sin\",job=\"{{.job}}\"})",
109 "legend": "s2sin"
110 },
111 {
112 "datasourceID": "prometheus",
113 "expr": "sum(prosody_mod_s2s__connections_outbound{type=\"s2sout\",job=\"{{.job}}\"})",
114 "legend": "s2sout"
115 }
116 ]
117 }
118 }
119 ]
120 }
121 }