From 99da1a04e4ddf9e5ff34e74dcc7f5fc047a4655e Mon Sep 17 00:00:00 2001 From: kat witch Date: Wed, 5 May 2021 17:05:17 +0100 Subject: [PATCH] services/prometheus: Ingest data from PromDapter on Samhain's VM --- hosts/samhain/nixos/default.nix | 2 ++ services/prometheus.nix | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hosts/samhain/nixos/default.nix b/hosts/samhain/nixos/default.nix index 4da89544..8acb4076 100644 --- a/hosts/samhain/nixos/default.nix +++ b/hosts/samhain/nixos/default.nix @@ -74,6 +74,8 @@ in { katnet.private.interfaces = singleton "hexnet"; katnet.public.interfaces = singleton "br"; + katnet.private.tcp.ports = [ 10445 ]; + services.usbmuxd.enable = true; systemd.timers.kat-glauca-dns = { diff --git a/services/prometheus.nix b/services/prometheus.nix index 46fbea30..13a3ef89 100644 --- a/services/prometheus.nix +++ b/services/prometheus.nix @@ -13,10 +13,17 @@ let in { services.prometheus = { enable = true; - scrapeConfigs = [{ + scrapeConfigs = [ + { job_name = "boline"; static_configs = [{ targets = [ "boline.net.kittywit.ch:8002" ]; }]; - }] ++ mapAttrsToList (hostName: prom: { + } + { + job_name = "samhain-vm"; + metrics_path = "/metrics"; + static_configs = [{ targets = [ "samhain.net.kittywit.ch:10445" ]; }]; + } + ] ++ mapAttrsToList (hostName: prom: { job_name = "${hostName}-nd"; metrics_path = "/api/v1/allmetrics"; honor_labels = true;