Добавление прометеуса
This commit is contained in:
parent
392a0b4620
commit
9f4fcb9654
4 changed files with 55 additions and 1 deletions
|
|
@ -9,6 +9,11 @@ ServerName localhost
|
||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
<Location /server-status>
|
||||||
|
SetHandler server-status
|
||||||
|
Require ip 10.10.1.0/24
|
||||||
|
</Location>
|
||||||
|
|
||||||
ErrorLog /proc/self/fd/2
|
ErrorLog /proc/self/fd/2
|
||||||
CustomLog /proc/self/fd/1 common
|
CustomLog /proc/self/fd/1 common
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
8
manufacturer/configs/prometheus/prometheus.yml
Normal file
8
manufacturer/configs/prometheus/prometheus.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
global:
|
||||||
|
scrape_interval: 15s
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: 'apache'
|
||||||
|
metrics_path: '/server-status'
|
||||||
|
static_configs:
|
||||||
|
- targets: ['10.10.1.2:80']
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
version: '3.7' # Указание версии Docker Compose
|
||||||
|
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: mariadb:11.6.2
|
image: mariadb:11.6.2
|
||||||
|
|
@ -6,11 +8,17 @@ services:
|
||||||
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
||||||
MYSQL_USER: ${MYSQL_USER}
|
MYSQL_USER: ${MYSQL_USER}
|
||||||
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||||||
|
networks:
|
||||||
|
db:
|
||||||
|
hostname: db
|
||||||
volumes:
|
volumes:
|
||||||
- db_data:/var/lib/mysql
|
- db_data:/var/lib/mysql
|
||||||
|
|
||||||
wordpress:
|
wordpress:
|
||||||
image: wordpress:6.7.1-php8.3-fpm-alpine
|
image: wordpress:6.7.1-php8.3-fpm-alpine
|
||||||
|
networks:
|
||||||
|
- wp
|
||||||
|
- db
|
||||||
volumes:
|
volumes:
|
||||||
- wordpress_data:/var/www/html
|
- wordpress_data:/var/www/html
|
||||||
|
|
||||||
|
|
@ -19,6 +27,10 @@ services:
|
||||||
context: ../../../.
|
context: ../../../.
|
||||||
dockerfile: manufacturer/container/apache/Dockerfile
|
dockerfile: manufacturer/container/apache/Dockerfile
|
||||||
image: custom-apache:v5.2
|
image: custom-apache:v5.2
|
||||||
|
networks:
|
||||||
|
metrics:
|
||||||
|
ipv4_address: 10.10.1.2
|
||||||
|
wp:
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
|
|
@ -28,6 +40,35 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- wordpress
|
- wordpress
|
||||||
|
|
||||||
|
prometheus:
|
||||||
|
image: prom/prometheus:v3.1.0
|
||||||
|
volumes:
|
||||||
|
- ../../configs/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
||||||
|
networks:
|
||||||
|
metrics:
|
||||||
|
ipv4_address: 10.10.1.3
|
||||||
|
ports:
|
||||||
|
- "9090:9090"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
wordpress_data:
|
wordpress_data:
|
||||||
db_data:
|
db_data:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
db:
|
||||||
|
name: db
|
||||||
|
driver: bridge
|
||||||
|
external: false
|
||||||
|
|
||||||
|
wp:
|
||||||
|
name: wp
|
||||||
|
driver: bridge
|
||||||
|
external: false
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
name: metrics
|
||||||
|
driver: bridge
|
||||||
|
external: false
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 10.10.1.0/24
|
||||||
Loading…
Add table
Add a link
Reference in a new issue