From a3a3502b707033dd84584602f3683f0daa39ecfb Mon Sep 17 00:00:00 2001 From: Garionion Date: Sat, 16 Jul 2022 19:34:10 +0200 Subject: [PATCH] dns: add prometheus scrape target --- hosts/dns/dns.nix | 7 ++++--- hosts/monitoring/configuration.nix | 12 ++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/hosts/dns/dns.nix b/hosts/dns/dns.nix index 2d3ee45..6477c66 100644 --- a/hosts/dns/dns.nix +++ b/hosts/dns/dns.nix @@ -2,6 +2,7 @@ { networking.firewall.interfaces.ens18.allowedUDPPorts = [ 53 ]; + networking.firewall.interfaces.ens18.allowedTCPPorts = [ 9253 9353]; services.coredns = { enable = true; config = '' @@ -21,9 +22,9 @@ log prometheus 10.42.10.8:9353 file /etc/zones/db.bula22.de - file /etc/zones/db.42.10.in-addr.arpa. - file /etc/zones/db.2.4.0.0.0.1.0.0.0.0.d.f.ip6.arpa. - file /etc/zones/db.1.2.2.8.c.0.c.1.8.f.4.0.1.0.a.2.ip6.arpa. + #file /etc/zones/db.42.10.in-addr.arpa. + #file /etc/zones/db.2.4.0.0.0.1.0.0.0.0.d.f.ip6.arpa. + #file /etc/zones/db.1.2.2.8.c.0.c.1.8.f.4.0.1.0.a.2.ip6.arpa. } ''; }; diff --git a/hosts/monitoring/configuration.nix b/hosts/monitoring/configuration.nix index 50079e2..0cc18a9 100644 --- a/hosts/monitoring/configuration.nix +++ b/hosts/monitoring/configuration.nix @@ -188,6 +188,18 @@ with lib; } ]; } + { + job_name = "dns"; + scrape_interval = "5s"; + static_configs = [ + { + targets = [ + "dns.bula22.de:9253" + "dns.bula22.de:9353" + ]; + } + ]; + } ]; alertmanagers = [ {