Skip to content

Commit

Permalink
grafana: include default dashboard and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pinheadmz committed Aug 6, 2024
1 parent 6e47bad commit 4fb03b1
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 0 deletions.
Binary file added docs/compact_dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/expanded_dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions docs/monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,34 @@ resources/scripts/connect_logging.sh
The Grafana dashboard (and API) will be accessible without requiring authentication
at http://localhost:3000

## Dashboards

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

```
curl localhost:3000/api/dashboards/db \
-H "Content-Type: application/json" \
--data "{\"dashboard\": $(cat resources/configs/grafana/default_dashboard.json)}"
```

Note the URL in the reply from the server (example):

```
{"folderUid":"","id":2,"slug":"default-warnet-dashboard","status":"success","uid":"fdu0pda1z6a68b","url":"/d/fdu0pda1z6a68b/default-warnet-dashboard","version":1}(
```

Open the dashboard in your browser (example):

`http://localhost:3000/d/fdu0pda1z6a68b/default-warnet-dashboard`

The metrics visualizers in the default dashboard will appear with minimal size:


![compact-dashboard](compact_dashboard.png)


...but they can be stretched and rearranged by dragging in the browser:


![compact-dashboard](expanded_dashboard.png)
95 changes: 95 additions & 0 deletions resources/configs/grafana/default_dashboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"title": "Default Warnet Dashboard",
"refresh": "5s",
"panels":
[
{
"datasource":
{
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"targets":
[
{
"datasource":
{
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"expr": "outbounds",
"legendFormat": "{{pod}}",
"range": true
}
],
"title": "Outbound connections",
"type": "timeseries"
},
{
"datasource":
{
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"targets":
[
{
"datasource":
{
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"expr": "inbounds",
"legendFormat": "{{pod}}",
"range": true
}
],
"title": "Inbound connections",
"type": "timeseries"
},
{
"datasource":
{
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"targets":
[
{
"datasource":
{
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"expr": "mempool_size",
"legendFormat": "{{pod}}",
"range": true
}
],
"title": "Mempool size",
"type": "timeseries"
},
{
"datasource":
{
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"targets":
[
{
"datasource":
{
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"expr": "blocks",
"legendFormat": "{{pod}}",
"range": true
}
],
"title": "Blocks",
"type": "timeseries"
}
]
}

0 comments on commit 4fb03b1

Please sign in to comment.