diff options
| author | Max Audron <audron@cocaine.farm> | 2025-07-31 15:32:46 +0200 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2025-07-31 15:32:46 +0200 |
| commit | 4fcbf49cbed4b5cccb837045bde898605d620f65 (patch) | |
| tree | af2e6439bccc10763cb79d4d9affca878993c2b6 /modules/monitoring/default.nix | |
| parent | try to run authentik natively (diff) | |
add more monitoring exporters and scrapers
Diffstat (limited to 'modules/monitoring/default.nix')
| -rw-r--r-- | modules/monitoring/default.nix | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/modules/monitoring/default.nix b/modules/monitoring/default.nix index 68df69b..05ca338 100644 --- a/modules/monitoring/default.nix +++ b/modules/monitoring/default.nix @@ -11,22 +11,9 @@ with self.lib.nginx; webExternalUrl = "https://prometheus.vapor.systems"; exporters = { - node = { - enable = true; - enabledCollectors = [ "systemd" ]; - }; - - zfs = { - enable = true; - }; - postgres = { enable = true; }; - - nginx = { - enable = true; - }; }; globalConfig = { @@ -37,25 +24,35 @@ with self.lib.nginx; { job_name = "node"; static_configs = [ - { targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; } + { targets = [ "ettves:${toString config.services.prometheus.exporters.node.port}" ]; } + { targets = [ "phaenn:${toString config.services.prometheus.exporters.node.port}" ]; } ]; } { job_name = "zfs"; static_configs = [ - { targets = [ "localhost:${toString config.services.prometheus.exporters.zfs.port}" ]; } + { targets = [ "ettves:${toString config.services.prometheus.exporters.zfs.port}" ]; } + { targets = [ "phaenn:${toString config.services.prometheus.exporters.zfs.port}" ]; } + ]; + } + { + job_name = "smartctl"; + static_configs = [ + { targets = [ "ettves:${toString config.services.prometheus.exporters.smartctl.port}" ]; } + { targets = [ "phaenn:${toString config.services.prometheus.exporters.smartctl.port}" ]; } ]; } { job_name = "postgres"; static_configs = [ - { targets = [ "localhost:${toString config.services.prometheus.exporters.postgres.port}" ]; } + { targets = [ "ettves:${toString config.services.prometheus.exporters.postgres.port}" ]; } ]; } { job_name = "nginx"; static_configs = [ - { targets = [ "localhost:${toString config.services.prometheus.exporters.nginx.port}" ]; } + { targets = [ "ettves:${toString config.services.prometheus.exporters.nginx.port}" ]; } + { targets = [ "phaenn:${toString config.services.prometheus.exporters.nginx.port}" ]; } ]; } { @@ -64,11 +61,23 @@ with self.lib.nginx; { targets = [ "localhost:${toString config.services.quassel.settings.metrics.port}" ]; } ]; } + { + job_name = "authentik"; + static_configs = [ + { targets = [ "ettves:9300" ]; } + { targets = [ "ettves:9303" ]; } + { targets = [ "ettves:9304" ]; } + ]; + } ]; }; services.nginx.statusPage = true; + services.udev.extraRules = '' + SUBSYSTEM=="nvme", KERNEL=="nvme[0-9]*", GROUP="disk" + ''; + security.acme.certs = { "vapor.systems" = { extraDomainNames = [ "*.vapor.systems" ]; |
