nixos/prometheus-exporters: fix nginx exporter startup

When nginx is enabled on the same host the nginx exporter is,
the exporter needs to start after nginx.
This commit is contained in:
WilliButz 2019-11-25 22:10:03 +01:00
parent 6127bf9837
commit adc5ae70bf
No known key found for this signature in database
GPG Key ID: 92582A10F1179CB2

View File

@ -197,6 +197,9 @@ in
services.prometheus.exporters.minio.minioAccessSecret = mkDefault config.services.minio.secretKey;
})] ++ [(mkIf config.services.rspamd.enable {
services.prometheus.exporters.rspamd.url = mkDefault "http://localhost:11334/stat";
})] ++ [(mkIf config.services.nginx.enable {
systemd.services.prometheus-nginx-exporter.after = [ "nginx.service" ];
systemd.services.prometheus-nginx-exporter.requires = [ "nginx.service" ];
})] ++ (mapAttrsToList (name: conf:
mkExporterConf {
inherit name;