Skip to content

Commit

Permalink
Added connection pool metrics to prometheus client (#21576)
Browse files Browse the repository at this point in the history
ref
https://linear.app/ghost/issue/ENG-1592/start-monitoring-connection-pool-utilization-in-ghost

- This commit adds prometheus metrics to the connection pool so we can
start to track connection pool utilization, number of pending acquires,
and also adds some basic SQL query summary metrics like queries per
minute and query duration percentiles.
- The connection pool has now been theorized to be a main constraint of
Ghost for some time, but it's been challenging to get actual visibility
into the state of the connection pool. With this change, we should be
able to directly observe, monitor and alert on the connection pool.
- Updated grafana version to fix a bug in the query editor that was
fixed in 8.3, even though this is a couple versions ahead of production
  • Loading branch information
cmraible authored Nov 8, 2024
1 parent 08fe08a commit 85408d1
Show file tree
Hide file tree
Showing 8 changed files with 2,526 additions and 1,585 deletions.
3 changes: 2 additions & 1 deletion .github/scripts/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ services:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
profiles: [monitoring]
image: grafana/grafana:8.2.3
image: grafana/grafana:8.3.0
container_name: ghost-grafana
ports:
- "3000:3000"
restart: always
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
volumes:
- ./grafana/datasources:/etc/grafana/provisioning/datasources
- ./grafana/dashboard.yml:/etc/grafana/provisioning/dashboards/main.yaml
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/grafana/dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ providers:
type: file
disableDeletion: false
updateIntervalSeconds: 10
allowUiUpdates: false
allowUiUpdates: true
options:
path: /var/lib/grafana/dashboards
foldersFromFilesStructure: true
Loading

0 comments on commit 85408d1

Please sign in to comment.