-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: provide default grafana dashboard (#101)
* feat: provide default grafana dashboard * docs: update README.md to point to config/README.md
- Loading branch information
Showing
10 changed files
with
3,889 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Configuration | ||
|
||
This folder is intended to contain various configuration files for the project. | ||
|
||
## Metrics | ||
|
||
### Using our provided grafana dashboard with prometheus and grafana | ||
|
||
From inside this directory, you can run the following command to start up a grafana and prometheus instance with some default dashboards and datasources set up. | ||
|
||
```sh | ||
docker compose -f docker-compose.yml up -d | ||
``` | ||
|
||
Then visit <http://localhost:3000/d/helia-http-gateway-default/helia-http-gateway-default-dashboard?orgId=1&refresh=5s> and login with the default credentials (admin:admin). The prometheus datasource and the dashboard should be automatically set up. | ||
|
||
If you want to generate some metrics quickly, you can run `npm run debug:until-death` and you should start seeing metrics in the dashboard for the results of querying the gateway for the websites listed by <https://probelab.io/websites/> | ||
|
||
If you need to reset the grafana database for whatever reason, you can try this command: `cd config && docker compose down && rm grafana/grafana.db && docker compose rm -fsv && docker compose up -d` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: '3' | ||
services: | ||
prometheus: | ||
image: prom/prometheus | ||
ports: | ||
- 9090:9090 | ||
volumes: | ||
- ./prometheus:/etc/prometheus | ||
command: | ||
- '--config.file=/etc/prometheus/prometheus.yml' | ||
restart: unless-stopped | ||
|
||
grafana: | ||
image: grafana/grafana | ||
ports: | ||
- 3000:3000 | ||
volumes: | ||
- ./grafana/datasources:/etc/grafana/provisioning/datasources | ||
- ./grafana/dashboard.yaml:/etc/grafana/provisioning/dashboards/main.yaml | ||
- ./grafana:/var/lib/grafana | ||
restart: unless-stopped |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# from https://stackoverflow.com/a/74995091/592760 | ||
apiVersion: 1 | ||
|
||
providers: | ||
- name: "Dashboard provider" | ||
orgId: 1 | ||
type: file | ||
disableDeletion: false | ||
updateIntervalSeconds: 10 | ||
allowUiUpdates: true | ||
options: | ||
path: /var/lib/grafana/dashboards | ||
foldersFromFilesStructure: true |
Oops, something went wrong.