Skip to content

Commit b752f6a

Browse files
kmoppelpashagolub
andauthored
[*] Prometheus Grafana v11 dashboard updates (#626)
* Prometheus Grafana v11 dashboard fixes Somethings seems has changed in how Grafana handles things, some panels failed to load. Adjusted on latest Grafana v11.4.0 * Remove a few fixed DS uids * update docker compose related files --------- Co-authored-by: Pavlo Golub <[email protected]>
1 parent 00693ba commit b752f6a

File tree

11 files changed

+4668
-1413
lines changed

11 files changed

+4668
-1413
lines changed

docker/bootstrap/prometheus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ alerting:
88
- targets: []
99
scheme: http
1010
timeout: 10s
11-
api_version: v1
11+
api_version: v2
1212
scrape_configs:
1313
- job_name: prometheus
1414
honor_timestamps: true
@@ -27,4 +27,4 @@ scrape_configs:
2727
scheme: http
2828
static_configs:
2929
- targets:
30-
- localhost:9187
30+
- pgwatch:9187

docker/compose.grafana.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@ services:
1818
- "3000:3000"
1919
restart: unless-stopped
2020
volumes:
21-
- "../grafana/postgres_datasource.yml:/etc/grafana/provisioning/datasources/pg_ds.yml"
22-
- "../grafana/postgres_dashboard.yml:/etc/grafana/provisioning/dashboards/pg_db.yml"
21+
- "../grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/pgwatch_dashboards.yml"
22+
# Uncomment the datasource version you want to use
23+
- "../grafana/postgres_datasource.yml:/etc/grafana/provisioning/datasources/postgres_datasource.yml"
24+
# - "../grafana/prometheus_datasource.yml:/etc/grafana/provisioning/datasources/prometheus_datasource.yml"
2325
# Uncomment the dashboard version you want to use and comment out the other one.
2426
- "../grafana/postgres/v10:/var/lib/grafana/dashboards"
25-
# - "./grafana/postgres/v11:/var/lib/grafana/dashboards"
27+
# - "../grafana/postgres/v11:/var/lib/grafana/dashboards"
28+
# - "../grafana/prometheus/v10:/var/lib/grafana/dashboards"
29+
# - "../grafana/prometheus/v11:/var/lib/grafana/dashboards"
2630
depends_on:
2731
postgres:
2832
condition: service_healthy

docker/compose.pgwatch.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ services:
77
image: cybertecpostgresql/pgwatch:latest
88
environment:
99
PW_SOURCES: postgresql://pgwatch@postgres:5432/pgwatch
10-
PW_SINK: postgresql://pgwatch@postgres:5432/pgwatch_metrics
11-
# command:
12-
# - "--log-level=debug"
10+
command:
11+
- "--sink=postgresql://pgwatch@postgres:5432/pgwatch_metrics"
12+
- "--sink=prometheus://pgwatch:9187/pgwatch"
1313
ports:
1414
- "8080:8080"
15+
- "9187:9187"
1516
depends_on:
1617
postgres:
1718
condition: service_healthy

docker/compose.prometheus.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ services:
88
restart: unless-stopped
99
volumes:
1010
- "./bootstrap/prometheus.yml:/etc/prometheus/prometheus.yml"
11-
profiles:
12-
- prometheus
11+
depends_on:
12+
postgres:
13+
condition: service_healthy

grafana/postgres_dashboard.yml renamed to grafana/dashboards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ providers:
44
- name: 'default'
55
orgId: 1
66
folder: ''
7-
type: file
7+
type: 'file'
88
disableDeletion: false
99
updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboards
1010
options:

0 commit comments

Comments
 (0)