diff options
author | Emile <git@emile.space> | 2025-04-11 19:35:42 +0200 |
---|---|---|
committer | Emile <git@emile.space> | 2025-04-11 19:35:42 +0200 |
commit | 81ddce855366e6dc51eda6d18787874f4de981e7 (patch) | |
tree | 6ac39efb231ed43b0eccda0532b552e9211a2119 /nix/hosts/lampadas | |
parent | 80c5627c9a55aaced41a8b5b532da22667bcf8e8 (diff) |
(lampadas) prometheus exporters
Diffstat (limited to 'nix/hosts/lampadas')
-rw-r--r-- | nix/hosts/lampadas/configuration.nix | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/nix/hosts/lampadas/configuration.nix b/nix/hosts/lampadas/configuration.nix index 2737f9d..007f8a1 100644 --- a/nix/hosts/lampadas/configuration.nix +++ b/nix/hosts/lampadas/configuration.nix @@ -181,10 +181,41 @@ in }; # metric exporters - prometheus.exporters = { - node.enable = true; # port 9100 - systemd.enable = true; # port 9558 - smartctl.enable = true; # port 9633 + prometheus = { + enable = true; + port = 9090; + listenAddress = "100.87.209.97"; + scrapeConfigs = [ + { + job_name = "node"; + static_configs = [{ + targets = [ + "localhost:${toString config.services.prometheus.exporters.node.port}" + ]; + }]; + } + { + job_name = "systemd"; + static_configs = [{ + targets = [ + "localhost:${toString config.services.prometheus.exporters.systemd.port}" + ]; + }]; + } + { + job_name = "smartctl"; + static_configs = [{ + targets = [ + "localhost:${toString config.services.prometheus.exporters.smartctl.port}" + ]; + }]; + } + ]; + exporters = { + node.enable = true; # port 9100 + systemd.enable = true; # port 9558 + smartctl.enable = true; # port 9633 + }; }; # shares |