mirror of
git://f0xx.org/ac/ac-deploy
synced 2026-08-12 18:12:19 +03:00
Monitor: Grafana auth proxy session fix and nginx login bypass.
Use ac_crash_sess shared session, allow password reset without auth_request, update grafana.ini template and alert rules. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -53,6 +53,7 @@ enabled = true
|
||||
header_name = X-WEBAUTH-USER
|
||||
header_property = username
|
||||
auto_sign_up = true
|
||||
enable_login_token = true
|
||||
# Trust X-WEBAUTH-USER only from cluster BE nginx (cast01–03):
|
||||
whitelist = 10.7.16.236,10.7.16.237,10.7.16.238
|
||||
# Sync roles from header (optional, set X-WEBAUTH-ROLE in nginx if needed):
|
||||
@@ -66,7 +67,13 @@ enabled = false
|
||||
enabled = true
|
||||
|
||||
[smtp]
|
||||
enabled = false # Grafana own SMTP not needed; alertmanager handles mail
|
||||
enabled = true
|
||||
host = smtp.gmail.com:587
|
||||
user = @MSMTP_USER@
|
||||
password = @MSMTP_PASS@
|
||||
from_address = @MSMTP_FROM@
|
||||
from_name = Android Cast Monitoring
|
||||
startTLS_policy = MandatoryStartTLS
|
||||
|
||||
[log]
|
||||
mode = file
|
||||
|
||||
@@ -61,24 +61,24 @@ groups:
|
||||
- alert: LowDiskWarning
|
||||
expr: >
|
||||
(node_filesystem_avail_bytes{fstype!~"tmpfs|devtmpfs|overlay"} /
|
||||
node_filesystem_size_bytes{fstype!~"tmpfs|devtmpfs|overlay"}) * 100 < 20
|
||||
node_filesystem_size_bytes{fstype!~"tmpfs|devtmpfs|overlay"}) * 100 < 7
|
||||
for: 15m
|
||||
labels:
|
||||
severity: warning
|
||||
annotations:
|
||||
summary: "Low disk on {{ $labels.instance }} mountpoint {{ $labels.mountpoint }}"
|
||||
description: "Free disk is {{ $value | printf \"%.1f\" }}% on {{ $labels.instance }}:{{ $labels.mountpoint }} (threshold: 20%)."
|
||||
description: "Free disk is {{ $value | printf \"%.1f\" }}% on {{ $labels.instance }}:{{ $labels.mountpoint }} (threshold: 7%)."
|
||||
|
||||
- alert: LowDiskCritical
|
||||
expr: >
|
||||
(node_filesystem_avail_bytes{fstype!~"tmpfs|devtmpfs|overlay"} /
|
||||
node_filesystem_size_bytes{fstype!~"tmpfs|devtmpfs|overlay"}) * 100 < 10
|
||||
node_filesystem_size_bytes{fstype!~"tmpfs|devtmpfs|overlay"}) * 100 < 5
|
||||
for: 10m
|
||||
labels:
|
||||
severity: critical
|
||||
annotations:
|
||||
summary: "Critical disk on {{ $labels.instance }}:{{ $labels.mountpoint }}"
|
||||
description: "Free disk is {{ $value | printf \"%.1f\" }}% (threshold: 10%) on {{ $labels.instance }}:{{ $labels.mountpoint }}."
|
||||
description: "Free disk is {{ $value | printf \"%.1f\" }}% (threshold: 5%) on {{ $labels.instance }}:{{ $labels.mountpoint }}."
|
||||
|
||||
# ── load ────────────────────────────────────────────────────────────────
|
||||
- alert: HighLoadWarning
|
||||
|
||||
Reference in New Issue
Block a user