fix(aquamarine): repair monitoring config

Load both *.yml and *.yaml alert rule files: the Loki rules were named .yaml while only *.yml was loaded, so they silently never ran. Fix the Grafana domain typo (writefo.fun -> writefor.fun). Comment out the postgres-playground datasource, which used the Grafana admin password for a role that has no password and could never authenticate.
This commit is contained in:
Ryan Yin
2026-09-19 12:11:07 +08:00
parent ff961c1bc9
commit d78f6badd4
3 changed files with 34 additions and 26 deletions
+31 -25
View File
@@ -88,31 +88,37 @@
}; };
editable = false; editable = false;
} }
{ # Disabled: the `playground` role has no password and remote logins
# https://grafana.com/docs/grafana/latest/datasources/postgres/configure/ # require scram-sha-256, so this datasource could never authenticate.
name = "postgres-playground"; # Re-enable once a `playground` DB password is provisioned
type = "postgres"; # (docs/system-audit-2026-09-19.md, item 1.5).
url = "postgres.writefor.fun:5432"; /*
user = "playground"; {
secureJsonData = { # https://grafana.com/docs/grafana/latest/datasources/postgres/configure/
password = "$__file{${config.age.secrets."grafana-admin-password".path}}"; name = "postgres-playground";
}; type = "postgres";
jsonData = { url = "postgres.writefor.fun:5432";
database = "playground"; user = "playground";
sslmode = "verify-full"; # disable/require/verify-ca/verify-full secureJsonData = {
maxOpenConns = 50; password = "$__file{${config.age.secrets."postgres-playground-password".path}}";
maxIdleConns = 250; };
maxIdleConnsAuto = true; jsonData = {
connMaxLifetime = 14400; database = "playground";
timeInterval = "1m"; sslmode = "verify-full"; # disable/require/verify-ca/verify-full
timescaledb = false; maxOpenConns = 50;
postgresVersion = 1500; # 15.xx maxIdleConns = 250;
# tls maxIdleConnsAuto = true;
tlsConfigurationMethod = "file-path"; connMaxLifetime = 14400;
sslRootCertFile = ../../../certs/ecc-ca.crt; timeInterval = "1m";
}; timescaledb = false;
editable = false; postgresVersion = 1500; # 15.xx
} # tls
tlsConfigurationMethod = "file-path";
sslRootCertFile = ../../../certs/ecc-ca.crt;
};
editable = false;
}
*/
{ {
name = "infinity-dataviewer"; name = "infinity-dataviewer";
type = "yesoreyeram-infinity-datasource"; type = "yesoreyeram-infinity-datasource";
+1 -1
View File
@@ -20,7 +20,7 @@
http_addr = "127.0.0.1"; http_addr = "127.0.0.1";
http_port = 3351; http_port = 3351;
protocol = "http"; protocol = "http";
domain = "grafana.writefo.fun"; domain = "grafana.writefor.fun";
# Redirect to correct domain if the host header does not match the domain. Prevents DNS rebinding attacks. # Redirect to correct domain if the host header does not match the domain. Prevents DNS rebinding attacks.
serve_from_sub_path = false; serve_from_sub_path = false;
# Add subpath to the root_url if serve_from_sub_path is true # Add subpath to the root_url if serve_from_sub_path is true
@@ -20,7 +20,9 @@
# Path to the files with alerting and/or recording rules. # Path to the files with alerting and/or recording rules.
rule = [ rule = [
"${./alert_rules}/*.yml" "${./alert_rules}/*.yml"
"${./alert_rules}/*.yaml"
"${./recoding_rules}/*.yml" "${./recoding_rules}/*.yml"
"${./recoding_rules}/*.yaml"
]; ];
# https://docs.victoriametrics.com/victoriametrics/vmalert/#link-to-alert-source # https://docs.victoriametrics.com/victoriametrics/vmalert/#link-to-alert-source
# Set this two args to generate the correct `.GeneratorURL` # Set this two args to generate the correct `.GeneratorURL`