diff options
| author | Max Audron <audron@cocaine.farm> | 2025-07-30 17:42:19 +0200 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2025-07-30 17:42:19 +0200 |
| commit | e1daabd42b6c8b5acb6c40259f1586c337060dc3 (patch) | |
| tree | 5d51fecf9713094de43a41f9cdc1a4da2e57d97a /modules | |
| parent | enable firewalls (diff) | |
more metrics
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/common/networking.nix | 2 | ||||
| -rw-r--r-- | modules/monitoring/default.nix | 38 | ||||
| -rw-r--r-- | modules/quassel/default.nix | 2 |
3 files changed, 41 insertions, 1 deletions
diff --git a/modules/common/networking.nix b/modules/common/networking.nix index 0a7b3f7..009610a 100644 --- a/modules/common/networking.nix +++ b/modules/common/networking.nix @@ -14,7 +14,7 @@ firewall = { enable = true; - trustedInterfaces = ["wg0"]; + trustedInterfaces = ["wg0" "podman0"]; allowedTCPPorts = [ 80 443 ]; }; nftables.enable = true; diff --git a/modules/monitoring/default.nix b/modules/monitoring/default.nix index ef27c7c..68df69b 100644 --- a/modules/monitoring/default.nix +++ b/modules/monitoring/default.nix @@ -15,6 +15,18 @@ with self.lib.nginx; enable = true; enabledCollectors = [ "systemd" ]; }; + + zfs = { + enable = true; + }; + + postgres = { + enable = true; + }; + + nginx = { + enable = true; + }; }; globalConfig = { @@ -28,9 +40,35 @@ with self.lib.nginx; { targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; } ]; } + { + job_name = "zfs"; + static_configs = [ + { targets = [ "localhost:${toString config.services.prometheus.exporters.zfs.port}" ]; } + ]; + } + { + job_name = "postgres"; + static_configs = [ + { targets = [ "localhost:${toString config.services.prometheus.exporters.postgres.port}" ]; } + ]; + } + { + job_name = "nginx"; + static_configs = [ + { targets = [ "localhost:${toString config.services.prometheus.exporters.nginx.port}" ]; } + ]; + } + { + job_name = "quassel"; + static_configs = [ + { targets = [ "localhost:${toString config.services.quassel.settings.metrics.port}" ]; } + ]; + } ]; }; + services.nginx.statusPage = true; + security.acme.certs = { "vapor.systems" = { extraDomainNames = [ "*.vapor.systems" ]; diff --git a/modules/quassel/default.nix b/modules/quassel/default.nix index ceeb3b0..7ea3acf 100644 --- a/modules/quassel/default.nix +++ b/modules/quassel/default.nix @@ -28,6 +28,8 @@ in db = { backend = "postgresql"; }; + metrics.enable = true; + logLevel = "Debug"; ssl = { required = true; certFile = "/var/lib/acme/cocaine.farm/cert.pem"; |
