Correct metrics records

This commit is contained in:
niten 2023-11-09 13:51:11 -08:00
parent 6ba1ceff20
commit 68184b1f23
1 changed files with 5 additions and 1 deletions

View File

@ -78,7 +78,11 @@ let
makeSrvProtocolRecords = protocol: serviceRecords: makeSrvProtocolRecords = protocol: serviceRecords:
joinLines (mapAttrsToList (makeSrvRecords 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: makeHostRecords = hostname:
{ ipv4-address, ipv6-address, sshfp-records, description, ... }: { ipv4-address, ipv6-address, sshfp-records, description, ... }: