throttling, abuse-protection & logging/monitoring pass

This commit is contained in:
2026-08-23 23:44:00 +03:30
parent cb18c93a3e
commit 80298b47b1
33 changed files with 4202 additions and 23 deletions

View File

@@ -0,0 +1,13 @@
# به Grafana می‌گه داشبوردهای JSON رو از /var/lib/grafana/dashboards
# (که در docker-compose.yml به docker/grafana/dashboards mount شده) بخونه.
apiVersion: 1
providers:
- name: Django Logs
orgId: 1
folder: ""
type: file
disableDeletion: false
updateIntervalSeconds: 30
options:
path: /var/lib/grafana/dashboards

View File

@@ -0,0 +1,15 @@
# Loki رو به‌صورتِ خودکار به‌عنوانِ دیتاسورسِ پیش‌فرضِ Grafana اضافه می‌کنه
# (نیازی به تنظیمِ دستی در UI نیست).
apiVersion: 1
datasources:
- name: Loki
type: loki
access: proxy
url: http://loki:3100
# UID رو صریح ست می‌کنیم چون داشبورد (django-logs.json) با همین UID
# (uid: "Loki") به این دیتاسورس ارجاع می‌ده؛ بدونِ این، Grafana خودش
# یک UID تصادفی تولید می‌کرد و ارجاعِ داشبورد resolve نمی‌شد.
uid: Loki
isDefault: true
editable: true