feat: add prometheus auth

This commit is contained in:
Swarsel 2024-10-18 22:45:04 +02:00
parent c5a6bda441
commit a9354c3959
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
3 changed files with 10 additions and 6 deletions

View file

@ -21,15 +21,16 @@
http_addr = "127.0.0.1";
protocol = "https";
domain = "status.swarsel.win";
root_url = "%(protocol)s://%(domain)s:%(http_port)s/grafana/";
};
};
};
services.prometheus = {
enable = true;
webExternalUrl = "https://status.swarsel.win/prometheus";
port = 9090;
listenAddress = "127.0.0.1";
webConfigFile = /../../programs/server/prometheus/web.config;
exporters = {
zfs = {
enable = true;
@ -49,13 +50,13 @@
acmeRoot = null;
locations = {
"/grafana" = {
proxyPass = "http://localhost:3000/grafana/";
proxyPass = "http://localhost:3000";
extraConfig = ''
client_max_body_size 0;
'';
};
"/prometheus" = {
proxyPass = "http://localhost:9090/prometheus/";
proxyPass = "http://localhost:9090";
extraConfig = ''
client_max_body_size 0;
'';