mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: add initial prometheus on winters
This commit is contained in:
parent
5f586cebef
commit
c5a6bda441
2 changed files with 63 additions and 13 deletions
|
|
@ -6576,8 +6576,8 @@ Also, the system state version is set here. No need to touch it.
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
grafanaadminpass = {
|
grafanaadminpass = {
|
||||||
owner = "grafana";
|
owner = "grafana";
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
users.users.grafana = {
|
users.users.grafana = {
|
||||||
extraGroups = [ "users" ];
|
extraGroups = [ "users" ];
|
||||||
};
|
};
|
||||||
|
|
@ -6585,10 +6585,30 @@ Also, the system state version is set here. No need to touch it.
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dataDir = "/Vault/data/grafana";
|
dataDir = "/Vault/data/grafana";
|
||||||
admin_password = "$__file{/run/secrets/grafanaadminpass}";
|
|
||||||
settings = {
|
settings = {
|
||||||
http_port = 3000;
|
security.admin_password = "$__file{/run/secrets/grafanaadminpass}";
|
||||||
http_addr = "127.0.0.1";
|
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"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -6599,11 +6619,17 @@ Also, the system state version is set here. No need to touch it.
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
acmeRoot = null;
|
acmeRoot = null;
|
||||||
locations = {
|
locations = {
|
||||||
"/" = {
|
"/grafana" = {
|
||||||
proxyPass = "http://localhost:3000/";
|
proxyPass = "http://localhost:3000/grafana/";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 0;
|
client_max_body_size 0;
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
"/prometheus" = {
|
||||||
|
proxyPass = "http://localhost:9090/prometheus/";
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size 0;
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@
|
||||||
owner = "grafana";
|
owner = "grafana";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
users.users.grafana = {
|
users.users.grafana = {
|
||||||
extraGroups = [ "users" ];
|
extraGroups = [ "users" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
|
|
@ -19,6 +19,24 @@
|
||||||
server = {
|
server = {
|
||||||
http_port = 3000;
|
http_port = 3000;
|
||||||
http_addr = "127.0.0.1";
|
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;
|
forceSSL = true;
|
||||||
acmeRoot = null;
|
acmeRoot = null;
|
||||||
locations = {
|
locations = {
|
||||||
"/" = {
|
"/grafana" = {
|
||||||
proxyPass = "http://localhost:3000/";
|
proxyPass = "http://localhost:3000/grafana/";
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size 0;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
"/prometheus" = {
|
||||||
|
proxyPass = "http://localhost:9090/prometheus/";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
client_max_body_size 0;
|
client_max_body_size 0;
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue