ops/nixos: update to cope with the fact we now have warnings/errors at the top level in the exporters set

This commit is contained in:
Luke Granger-Brown 2022-12-19 08:27:41 +00:00
parent a66bca1520
commit 376e20fe04

View file

@ -67,7 +67,7 @@ let
};
}];
};
stockExporters = lib.mapAttrsToList (exporterName: exporter: mkExporter exporterName exporter.port) (lib.filterAttrs (exporterName: exporter: exporterName != "snmp" && exporter.enable) sys.config.services.prometheus.exporters);
stockExporters = lib.mapAttrsToList (exporterName: exporter: mkExporter exporterName exporter.port) (lib.filterAttrs (exporterName: exporter: builtins.isAttrs exporter && exporterName != "snmp" && exporter.enable) sys.config.services.prometheus.exporters);
customExporters = lib.mapAttrsToList mkExporter sys.config.my.prometheus.additionalExporterPorts;
in
stockExporters ++ customExporters;