Skip to content

Commit 101cff7

Browse files
feat: remove unnecessary monitoring services, add API alive status tracking
- Remove Prometheus, Grafana, Uptime Kuma services from docker-compose files and delete their config directories (prometheus/, grafana/) - Remove prometheus-client dependency from requirements.txt - Clean up prometheus metric methods from scheduler.py - Add endpoint_statuses table to track API up/down state per endpoint - Record endpoint status on every scheduled check (success or failure) - Add POST /api/ping/{provider}/{endpoint} for manual alive checks - Add GET /api/statuses to list all endpoint statuses - Update dashboard with API Durum panel showing UP/DOWN status, HTTP codes, response times, and per-endpoint Ping buttons - Provider cards now show real status indicator (green/red/gray) based on actual endpoint health data Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2b5bbd3 commit 101cff7

13 files changed

Lines changed: 476 additions & 490 deletions

File tree

docker-compose.prod.yml

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
services:
99
schema-monitor:
10-
image: ayssoft/api-sentinel-monitor:${IMAGE_TAG:-latest}
10+
image: ayssoft/api-sentinel-monitor:latest
1111
container_name: api-sentinel-monitor
1212
ports:
1313
- "${MONITOR_PORT:-8080}:8080"
@@ -31,7 +31,7 @@ services:
3131
restart: unless-stopped
3232

3333
changelog-watcher:
34-
image: ayssoft/api-sentinel-changelog:${IMAGE_TAG:-latest}
34+
image: ayssoft/api-sentinel-changelog:latest
3535
container_name: api-sentinel-changelog
3636
volumes:
3737
- changelog-data:/app/data
@@ -44,54 +44,33 @@ services:
4444
condition: service_healthy
4545
restart: unless-stopped
4646

47-
uptime-kuma:
48-
image: louislam/uptime-kuma:1
49-
container_name: api-sentinel-uptime
50-
ports:
51-
- "${UPTIME_PORT:-3001}:3001"
52-
volumes:
53-
- uptime-data:/app/data
54-
networks:
55-
- sentinel-net
56-
restart: unless-stopped
57-
58-
prometheus:
59-
image: prom/prometheus:v2.51.0
60-
container_name: api-sentinel-prometheus
61-
ports:
62-
- "${PROMETHEUS_PORT:-9090}:9090"
63-
volumes:
64-
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
65-
- ./prometheus/alert_rules.yml:/etc/prometheus/alert_rules.yml:ro
66-
- prometheus-data:/prometheus
67-
networks:
68-
- sentinel-net
69-
restart: unless-stopped
70-
71-
grafana:
72-
image: grafana/grafana:11.4.0
73-
container_name: api-sentinel-grafana
74-
ports:
75-
- "${GRAFANA_PORT:-3000}:3000"
76-
volumes:
77-
- ./grafana/dashboards:/var/lib/grafana/dashboards:ro
78-
- grafana-data:/var/lib/grafana
47+
watchtower:
48+
image: containrrr/watchtower:latest
49+
container_name: api-watchtower
50+
restart: always
51+
deploy:
52+
resources:
53+
limits:
54+
memory: 128M
55+
cpus: '0.1'
56+
reservations:
57+
memory: 64M
58+
cpus: '0.05'
7959
environment:
80-
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
81-
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/var/lib/grafana/dashboards/api-sentinel.json
60+
- DOCKER_API_VERSION=1.44
61+
- REPO_USER=sistem@ayssoft.com
62+
- REPO_PASS=Na9528692
63+
volumes:
64+
- /var/run/docker.sock:/var/run/docker.sock
65+
- /root/.docker/config.json:/config.json
66+
command: --interval 300 --cleanup api-sentinel
8267
networks:
8368
- sentinel-net
84-
depends_on:
85-
- prometheus
86-
restart: unless-stopped
8769

8870
volumes:
8971
schema-data:
9072
schema-files:
9173
changelog-data:
92-
uptime-data:
93-
prometheus-data:
94-
grafana-data:
9574

9675
networks:
9776
sentinel-net:

docker-compose.yml

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -43,54 +43,10 @@ services:
4343
condition: service_healthy
4444
restart: unless-stopped
4545

46-
uptime-kuma:
47-
image: louislam/uptime-kuma:1
48-
container_name: api-sentinel-uptime
49-
ports:
50-
- "${UPTIME_PORT:-3001}:3001"
51-
volumes:
52-
- uptime-data:/app/data
53-
networks:
54-
- sentinel-net
55-
restart: unless-stopped
56-
57-
prometheus:
58-
image: prom/prometheus:v2.51.0
59-
container_name: api-sentinel-prometheus
60-
ports:
61-
- "${PROMETHEUS_PORT:-9090}:9090"
62-
volumes:
63-
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
64-
- ./prometheus/alert_rules.yml:/etc/prometheus/alert_rules.yml:ro
65-
- prometheus-data:/prometheus
66-
networks:
67-
- sentinel-net
68-
restart: unless-stopped
69-
70-
grafana:
71-
image: grafana/grafana:11.4.0
72-
container_name: api-sentinel-grafana
73-
ports:
74-
- "${GRAFANA_PORT:-3000}:3000"
75-
volumes:
76-
- ./grafana/dashboards:/var/lib/grafana/dashboards:ro
77-
- grafana-data:/var/lib/grafana
78-
environment:
79-
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-admin}
80-
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/var/lib/grafana/dashboards/api-sentinel.json
81-
networks:
82-
- sentinel-net
83-
depends_on:
84-
- prometheus
85-
restart: unless-stopped
86-
8746
volumes:
8847
schema-data:
8948
schema-files:
9049
changelog-data:
91-
uptime-data:
92-
prometheus-data:
93-
grafana-data:
9450

9551
networks:
9652
sentinel-net:

0 commit comments

Comments
 (0)