mirror of
https://github.com/KeyZox71/knl_meowscendence.git
synced 2025-08-14 12:32:54 +02:00
「✨」 feat: added nginx exporter
This commit is contained in:
@ -39,3 +39,10 @@ server {
|
|||||||
server_name example.com;
|
server_name example.com;
|
||||||
return 301 https://$host$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
location /nginx_status {
|
||||||
|
stub_status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
include:
|
include:
|
||||||
- ./prometheus/compose.yml
|
- ./prometheus/compose.yml
|
||||||
|
- ./exporters/compose.yml
|
||||||
|
2
docker/monitoring/exporters/compose.yml
Normal file
2
docker/monitoring/exporters/compose.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
include:
|
||||||
|
- ./nginx/compose.yml
|
0
docker/monitoring/exporters/nginx/Dockerfile
Normal file
0
docker/monitoring/exporters/nginx/Dockerfile
Normal file
12
docker/monitoring/exporters/nginx/compose.yml
Normal file
12
docker/monitoring/exporters/nginx/compose.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
services:
|
||||||
|
nginx-exporter:
|
||||||
|
container_name: transcendence-nginx-exporter
|
||||||
|
image: nginx/nginx-prometheus-exporter:latest
|
||||||
|
command:
|
||||||
|
- '-nginx.scrape-uri=http://transcendence-front:8080/nginx_status'
|
||||||
|
depends_on:
|
||||||
|
front:
|
||||||
|
condition: service_started
|
||||||
|
networks:
|
||||||
|
- front
|
||||||
|
- prom-exporter
|
@ -26,4 +26,5 @@ services:
|
|||||||
- '--web.enable-lifecycle'
|
- '--web.enable-lifecycle'
|
||||||
networks:
|
networks:
|
||||||
- prom
|
- prom
|
||||||
|
- prom-exporter
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
global:
|
global:
|
||||||
scrape_interval: 30s
|
scrape_interval: 5s
|
||||||
|
|
||||||
# alerting:
|
# alerting:
|
||||||
# alertmanagers:
|
# alertmanagers:
|
||||||
@ -15,3 +15,7 @@ scrape_configs:
|
|||||||
password: PROM_ADMIN_PASSWD
|
password: PROM_ADMIN_PASSWD
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['localhost:9090']
|
- targets: ['localhost:9090']
|
||||||
|
|
||||||
|
- job_name: 'nginx'
|
||||||
|
static_configs:
|
||||||
|
- targets: ['nginx-exporter:9113']
|
||||||
|
@ -15,13 +15,13 @@ if (!env || env === 'development') {
|
|||||||
|
|
||||||
function prepareDB() {
|
function prepareDB() {
|
||||||
database.exec(`
|
database.exec(`
|
||||||
CREATE TABLE userData (
|
CREATE TABLE IF NOT EXISTS userData (
|
||||||
username TEXT PRIMARY KEY,
|
username TEXT PRIMARY KEY,
|
||||||
displayName TEXT
|
displayName TEXT
|
||||||
) STRICT
|
) STRICT
|
||||||
`);
|
`);
|
||||||
database.exec(`
|
database.exec(`
|
||||||
CREATE TABLE friends (
|
CREATE TABLE IF NOT EXISTS friends (
|
||||||
username TEXT,
|
username TEXT,
|
||||||
friendName TEXT,
|
friendName TEXT,
|
||||||
UNIQUE(username, friendName),
|
UNIQUE(username, friendName),
|
||||||
|
Reference in New Issue
Block a user