-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Basic Prometheus/Grafana setup * fix metrics endpoint * Add full setup instructions * docker volume, improved instructions
- Loading branch information
Showing
8 changed files
with
205 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Grafana Monitoring for relayer | ||
=== | ||
|
||
Use the following steps for monitoring: | ||
|
||
- Execute relayer on localhost as usual | ||
- Alternatively, change the target value from `localhost:9955` to the address of a remote relayer | ||
- Run `docker-compose up` in this directory | ||
- Open Prometheus on `http://localhost:9090`. You can directly query for data | ||
- Open Grafana on `http://localhost:3000`. Use the following steps for initial setup: | ||
- Login with `admin` / `admin` | ||
- Click the cogwheel icon on the bottom left and go to "Data sources" | ||
- Click "Add new data source", add Prometheus with URL `http://localhost:9090/` and click "Save & test" | ||
- Click "Dashboard" in the top left menu and select "Import" | ||
- Upload `grafana-dashboard.json` from this folder |
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,23 @@ | ||
version: '3' | ||
|
||
services: | ||
grafana: | ||
image: grafana/grafana:9.4.7 | ||
network_mode: "host" | ||
ports: | ||
- "3000:3000" | ||
depends_on: | ||
- prometheus | ||
volumes: | ||
- grafana-data:/var/lib/grafana | ||
|
||
prometheus: | ||
image: prom/prometheus:v2.43.0 | ||
network_mode: "host" | ||
ports: | ||
- "9090:9090" | ||
volumes: | ||
- ./prometheus.yml:/etc/prometheus/prometheus.yml | ||
|
||
volumes: | ||
grafana-data: |
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,142 @@ | ||
{ | ||
"annotations": { | ||
"list": [ | ||
{ | ||
"builtIn": 1, | ||
"datasource": { | ||
"type": "grafana", | ||
"uid": "-- Grafana --" | ||
}, | ||
"enable": true, | ||
"hide": true, | ||
"iconColor": "rgba(0, 211, 255, 1)", | ||
"name": "Annotations & Alerts", | ||
"target": { | ||
"limit": 100, | ||
"matchAny": false, | ||
"tags": [], | ||
"type": "dashboard" | ||
}, | ||
"type": "dashboard" | ||
} | ||
] | ||
}, | ||
"editable": true, | ||
"fiscalYearStartMonth": 0, | ||
"graphTooltip": 0, | ||
"id": 1, | ||
"links": [], | ||
"liveNow": false, | ||
"panels": [ | ||
{ | ||
"datasource": { | ||
"type": "prometheus", | ||
"uid": "BtDYMgE4z" | ||
}, | ||
"fieldConfig": { | ||
"defaults": { | ||
"color": { | ||
"mode": "palette-classic" | ||
}, | ||
"custom": { | ||
"axisCenteredZero": false, | ||
"axisColorMode": "text", | ||
"axisLabel": "", | ||
"axisPlacement": "auto", | ||
"barAlignment": 0, | ||
"drawStyle": "line", | ||
"fillOpacity": 0, | ||
"gradientMode": "none", | ||
"hideFrom": { | ||
"legend": false, | ||
"tooltip": false, | ||
"viz": false | ||
}, | ||
"lineInterpolation": "linear", | ||
"lineWidth": 1, | ||
"pointSize": 5, | ||
"scaleDistribution": { | ||
"type": "linear" | ||
}, | ||
"showPoints": "auto", | ||
"spanNulls": false, | ||
"stacking": { | ||
"group": "A", | ||
"mode": "none" | ||
}, | ||
"thresholdsStyle": { | ||
"mode": "off" | ||
} | ||
}, | ||
"mappings": [], | ||
"thresholds": { | ||
"mode": "absolute", | ||
"steps": [ | ||
{ | ||
"color": "green", | ||
"value": null | ||
}, | ||
{ | ||
"color": "red", | ||
"value": 80 | ||
} | ||
] | ||
} | ||
}, | ||
"overrides": [] | ||
}, | ||
"gridPos": { | ||
"h": 8, | ||
"w": 12, | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"id": 2, | ||
"options": { | ||
"legend": { | ||
"calcs": [], | ||
"displayMode": "list", | ||
"placement": "bottom", | ||
"showLegend": true | ||
}, | ||
"tooltip": { | ||
"mode": "single", | ||
"sort": "none" | ||
} | ||
}, | ||
"targets": [ | ||
{ | ||
"datasource": { | ||
"type": "prometheus", | ||
"uid": "BtDYMgE4z" | ||
}, | ||
"editorMode": "builder", | ||
"expr": "bridge_watcher_back_off", | ||
"legendFormat": "__auto", | ||
"range": true, | ||
"refId": "A" | ||
} | ||
], | ||
"title": "Panel Title", | ||
"type": "timeseries" | ||
} | ||
], | ||
"refresh": "", | ||
"revision": 1, | ||
"schemaVersion": 38, | ||
"style": "dark", | ||
"tags": [], | ||
"templating": { | ||
"list": [] | ||
}, | ||
"time": { | ||
"from": "now-6h", | ||
"to": "now" | ||
}, | ||
"timepicker": {}, | ||
"timezone": "", | ||
"title": "Relayer", | ||
"uid": "c3fyMgPVz", | ||
"version": 2, | ||
"weekStart": "" | ||
} |
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,10 @@ | ||
global: | ||
scrape_interval: 15s | ||
evaluation_interval: 30s | ||
|
||
scrape_configs: | ||
- job_name: 'webb-relayer' | ||
metrics_path: '/api/v1/metrics' | ||
|
||
static_configs: | ||
- targets: ['localhost:9955'] |
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
File renamed without changes.
File renamed without changes.