feat: add initial prometheus on winters

This commit is contained in:
Swarsel 2024-10-18 22:03:17 +02:00
parent 5f586cebef
commit c5a6bda441
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
2 changed files with 63 additions and 13 deletions

View file

@ -7,8 +7,8 @@
owner = "grafana";
};
};
users.users.grafana = {
extraGroups = [ "users" ];
users.users.grafana = {
extraGroups = [ "users" ];
};
services.grafana = {
@ -19,6 +19,24 @@
server = {
http_port = 3000;
http_addr = "127.0.0.1";
protocol = "https";
domain = "status.swarsel.win";
root_url = "%(protocol)s://%(domain)s:%(http_port)s/grafana/";
};
};
};
services.prometheus = {
webExternalUrl = "https://status.swarsel.win/prometheus";
port = 9090;
listenAddress = "127.0.0.1";
exporters = {
zfs = {
enable = true;
port = 9134;
pools = [
"Vault"
];
};
};
};
@ -30,8 +48,14 @@
forceSSL = true;
acmeRoot = null;
locations = {
"/" = {
proxyPass = "http://localhost:3000/";
"/grafana" = {
proxyPass = "http://localhost:3000/grafana/";
extraConfig = ''
client_max_body_size 0;
'';
};
"/prometheus" = {
proxyPass = "http://localhost:9090/prometheus/";
extraConfig = ''
client_max_body_size 0;
'';