From 272ffb793d26d1118a2c7f9e0bdae7e5d8a2c580 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 31 Dec 2021 16:08:40 +0100 Subject: vidhar: prometheus: ... --- hosts/vidhar/dsl.nix | 5 +++++ hosts/vidhar/prometheus.nix | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'hosts') diff --git a/hosts/vidhar/dsl.nix b/hosts/vidhar/dsl.nix index 8cbfc1e7..27a07224 100644 --- a/hosts/vidhar/dsl.nix +++ b/hosts/vidhar/dsl.nix @@ -96,6 +96,11 @@ in { dnssl = [{ domain_names = ["yggdrasil"]; }]; } ]; + + debug = { + address = "localhost:9430"; + prometheus = true; + }; }; }; services.ndppd = { diff --git a/hosts/vidhar/prometheus.nix b/hosts/vidhar/prometheus.nix index 1eaacd0f..2ad6667a 100644 --- a/hosts/vidhar/prometheus.nix +++ b/hosts/vidhar/prometheus.nix @@ -36,7 +36,7 @@ in { snmp = { enable = true; configuration = { - default = { auth = { community = "public"; }; version = "2"; }; + default = { auth = { community = "public"; }; version = 2; }; }; }; unbound = { @@ -101,8 +101,17 @@ in { ]; relabel_configs = relabelHosts; } + { job_name = "corerad"; + static_configs = [ + { targets = ["localhost:9430"]; } + ]; + relabel_configs = relabelHosts; + } ]; }; + users.users.${config.services.prometheus.exporters.unbound.user} = { + extraGroups = [ config.services.unbound.group ]; + }; systemd.services."prometheus-zte-exporter@10.141.1.3" = { wantedBy = [ "multi-user.target" ]; @@ -136,7 +145,7 @@ in { Type = "simple"; ExecStart = "${pkgs.zte-prometheus-exporter}/bin/zte-prometheus-exporter"; - Environment = "ZTE_BASEURL=%I ZTE_HOSTNAME=localhost ZTE_PORT=9900"; + Environment = "ZTE_BASEURL=http://%I ZTE_HOSTNAME=localhost ZTE_PORT=9900"; EnvironmentFile = config.sops.secrets."zte_10.141.1.3".path; }; }; -- cgit v1.2.3