modules/prometheus: add basic auth
This commit is contained in:
parent
97fcdefc2b
commit
74b67e1854
10 changed files with 184 additions and 194 deletions
|
@ -46,6 +46,21 @@ in
|
|||
);
|
||||
};
|
||||
|
||||
# gotosocial
|
||||
sops.templates."gotosocial_metrics.env" = {
|
||||
content = ''
|
||||
GTS_METRICS_AUTH_ENABLED=true
|
||||
GTS_METRICS_AUTH_USERNAME=${config.sops.placeholder."prometheus/metrics_username"}
|
||||
GTS_METRICS_AUTH_PASSWORD=${config.sops.placeholder."prometheus/metrics_password"}
|
||||
'';
|
||||
group = "prometheus-auth";
|
||||
mode = "0440";
|
||||
};
|
||||
systemd.services.gotosocial.serviceConfig = {
|
||||
EnvironmentFile = [ config.sops.templates."gotosocial_metrics.env".path ];
|
||||
SupplementaryGroups = [ "prometheus-auth" ];
|
||||
};
|
||||
|
||||
services.gotosocial.settings = {
|
||||
metrics-enabled = true;
|
||||
};
|
||||
|
@ -55,7 +70,24 @@ in
|
|||
};
|
||||
|
||||
services.restic.server.prometheus = true;
|
||||
systemd.services.miniflux.environment.METRICS_COLLECTOR = "1";
|
||||
|
||||
# miniflux
|
||||
sops.templates."miniflux_metrics_env" = {
|
||||
content = ''
|
||||
METRICS_COLLECTOR=1
|
||||
LOG_LEVEL=debug
|
||||
METRICS_USERNAME=${config.sops.placeholder."prometheus/metrics_username"}
|
||||
METRICS_PASSWORD=${config.sops.placeholder."prometheus/metrics_password"}
|
||||
'';
|
||||
group = "prometheus-auth";
|
||||
mode = "0440";
|
||||
};
|
||||
|
||||
systemd.services.miniflux.serviceConfig = {
|
||||
EnvironmentFile = [ config.sops.templates."miniflux_metrics_env".path ];
|
||||
SupplementaryGroups = [ "prometheus-auth" ];
|
||||
};
|
||||
|
||||
services.ntfy-sh.settings.enable-metrics = true;
|
||||
|
||||
services.caddy.globalConfig = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue