From 68184b1f23b371f90d3c3b74f90de1e967127595 Mon Sep 17 00:00:00 2001 From: niten Date: Thu, 9 Nov 2023 13:51:11 -0800 Subject: [PATCH] Correct metrics records --- zone-to-zonefile.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zone-to-zonefile.nix b/zone-to-zonefile.nix index 27451e2..fa06b69 100644 --- a/zone-to-zonefile.nix +++ b/zone-to-zonefile.nix @@ -78,7 +78,11 @@ let makeSrvProtocolRecords = protocol: serviceRecords: joinLines (mapAttrsToList (makeSrvRecords protocol) serviceRecords); - makeMetricRecords = metricType: makeSrvRecords "tcp" metricType; + makeMetricRecords = metricType: records: + joinLines (map (record: + "${metricType}._metrics._tcp IN SRV ${toString record.priority} ${ + toString record.weight + } ${toString record.port} ${hostToFqdn record.host}") records); makeHostRecords = hostname: { ipv4-address, ipv6-address, sshfp-records, description, ... }: