Skip to content

Commit 4fb03b1

Browse files
committed
grafana: include default dashboard and docs
1 parent 6e47bad commit 4fb03b1

File tree

4 files changed

+124
-0
lines changed

4 files changed

+124
-0
lines changed

docs/compact_dashboard.png

129 KB
Loading

docs/expanded_dashboard.png

259 KB
Loading

docs/monitoring.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,34 @@ resources/scripts/connect_logging.sh
7979
The Grafana dashboard (and API) will be accessible without requiring authentication
8080
at http://localhost:3000
8181

82+
## Dashboards
8283

84+
To view the default metrics in the included default dashboard, upload the dashboard
85+
JSON file to the Grafana server:
8386

87+
```
88+
curl localhost:3000/api/dashboards/db \
89+
-H "Content-Type: application/json" \
90+
--data "{\"dashboard\": $(cat resources/configs/grafana/default_dashboard.json)}"
91+
```
92+
93+
Note the URL in the reply from the server (example):
94+
95+
```
96+
{"folderUid":"","id":2,"slug":"default-warnet-dashboard","status":"success","uid":"fdu0pda1z6a68b","url":"/d/fdu0pda1z6a68b/default-warnet-dashboard","version":1}(
97+
```
98+
99+
Open the dashboard in your browser (example):
100+
101+
`http://localhost:3000/d/fdu0pda1z6a68b/default-warnet-dashboard`
102+
103+
The metrics visualizers in the default dashboard will appear with minimal size:
104+
105+
106+
![compact-dashboard](compact_dashboard.png)
107+
108+
109+
...but they can be stretched and rearranged by dragging in the browser:
110+
111+
112+
![compact-dashboard](expanded_dashboard.png)
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"title": "Default Warnet Dashboard",
3+
"refresh": "5s",
4+
"panels":
5+
[
6+
{
7+
"datasource":
8+
{
9+
"type": "prometheus",
10+
"uid": "PBFA97CFB590B2093"
11+
},
12+
"targets":
13+
[
14+
{
15+
"datasource":
16+
{
17+
"type": "prometheus",
18+
"uid": "PBFA97CFB590B2093"
19+
},
20+
"expr": "outbounds",
21+
"legendFormat": "{{pod}}",
22+
"range": true
23+
}
24+
],
25+
"title": "Outbound connections",
26+
"type": "timeseries"
27+
},
28+
{
29+
"datasource":
30+
{
31+
"type": "prometheus",
32+
"uid": "PBFA97CFB590B2093"
33+
},
34+
"targets":
35+
[
36+
{
37+
"datasource":
38+
{
39+
"type": "prometheus",
40+
"uid": "PBFA97CFB590B2093"
41+
},
42+
"expr": "inbounds",
43+
"legendFormat": "{{pod}}",
44+
"range": true
45+
}
46+
],
47+
"title": "Inbound connections",
48+
"type": "timeseries"
49+
},
50+
{
51+
"datasource":
52+
{
53+
"type": "prometheus",
54+
"uid": "PBFA97CFB590B2093"
55+
},
56+
"targets":
57+
[
58+
{
59+
"datasource":
60+
{
61+
"type": "prometheus",
62+
"uid": "PBFA97CFB590B2093"
63+
},
64+
"expr": "mempool_size",
65+
"legendFormat": "{{pod}}",
66+
"range": true
67+
}
68+
],
69+
"title": "Mempool size",
70+
"type": "timeseries"
71+
},
72+
{
73+
"datasource":
74+
{
75+
"type": "prometheus",
76+
"uid": "PBFA97CFB590B2093"
77+
},
78+
"targets":
79+
[
80+
{
81+
"datasource":
82+
{
83+
"type": "prometheus",
84+
"uid": "PBFA97CFB590B2093"
85+
},
86+
"expr": "blocks",
87+
"legendFormat": "{{pod}}",
88+
"range": true
89+
}
90+
],
91+
"title": "Blocks",
92+
"type": "timeseries"
93+
}
94+
]
95+
}

0 commit comments

Comments
 (0)