diff options
| author | seth <[email protected]> | 2023-05-21 13:46:36 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-05-21 13:46:36 -0400 |
| commit | c6b38fd8f0e5908e5593d33e66cae8980f560c1b (patch) | |
| tree | caee5d2585b0e62c3dc26f4bd324ea6cd49aadfe /hosts/p-body/prometheus.nix | |
| parent | ed52175975f8f448cd66372c5ff8d3e900fc1541 (diff) | |
move monitoring setup to modules
Diffstat (limited to 'hosts/p-body/prometheus.nix')
| -rw-r--r-- | hosts/p-body/prometheus.nix | 13 |
1 files changed, 10 insertions, 3 deletions
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"; + } + ]; } |
