Skip to content

Commit d3b81ac

Browse files
Feat: Percona Integration
1 parent 889cc62 commit d3b81ac

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

compose.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ services:
1818
retries: 3
1919
depends_on:
2020
- redis
21+
volumes:
22+
- db:/var/lib/mysql
23+
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
24+
2125
networks:
2226
- fast-api-network
2327

@@ -75,7 +79,33 @@ services:
7579
- worker
7680
networks:
7781
- fast-api-network
82+
pmm-server:
83+
image: percona/pmm-server:latest
84+
ports:
85+
- "443:443"
86+
volumes:
87+
- pmm-data:/srv
88+
environment:
89+
SERVER_USER: admin
90+
SERVER_PASSWORD: admin
91+
networks:
92+
- fast-api-network
93+
94+
pmm-client:
95+
image: percona/pmm-client:latest
96+
environment:
97+
PMM_SERVER: pmm-server
98+
volumes:
99+
- /proc:/host/proc:ro
100+
- /sys:/host/sys:ro
101+
- /:/host:ro
102+
networks:
103+
- fast-api-network
78104

79105
networks:
80106
fast-api-network:
81107
driver: bridge
108+
109+
volumes:
110+
db:
111+
pmm-data:

docker-entrypoint-initdb.d/init.sql

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
INSTALL PLUGIN QUERY_RESPONSE_TIME_AUDIT SONAME 'query_response_time.so';
2+
INSTALL PLUGIN QUERY_RESPONSE_TIME SONAME 'query_response_time.so';
3+
INSTALL PLUGIN QUERY_RESPONSE_TIME_READ SONAME 'query_response_time.so';
4+
INSTALL PLUGIN QUERY_RESPONSE_TIME_WRITE SONAME 'query_response_time.so';
5+
SET GLOBAL query_response_time_stats=ON;

0 commit comments

Comments
 (0)