From c6b38fd8f0e5908e5593d33e66cae8980f560c1b Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 21 May 2023 13:46:36 -0400 Subject: move monitoring setup to modules --- hosts/p-body/prometheus.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'hosts/p-body/prometheus.nix') diff --git a/hosts/p-body/prometheus.nix b/hosts/p-body/prometheus.nix index a0d272d..56e05a9 100644 --- a/hosts/p-body/prometheus.nix +++ b/hosts/p-body/prometheus.nix @@ -1,10 +1,10 @@ {config, ...}: let - scrapeExporter = name: exporter: { + scrapeExporter = name: host: port: { job_name = "${name}"; static_configs = [ { targets = [ - "127.0.0.1:${toString config.services.prometheus.exporters.${exporter}.port}" + "${host}:${port}" ]; } ]; @@ -21,7 +21,14 @@ in { }; }; scrapeConfigs = [ - (scrapeExporter "p-body" "node") + (scrapeExporter "p-body" "127.0.0.1" "${toString config.services.prometheus.exporters.node.port}") + (scrapeExporter "atlas" "atlas" "5001") ]; }; + + getchoo.server.services.promtail.clients = [ + { + url = "http://127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}/loki/api/v1/push"; + } + ]; } -- cgit v1.2.3