
- prometheus exporters are now configured with `services.prometheus.exporters.<name>` - the exporters are now defined by attribute sets from which the options for each exporter are generated - most of the exporter definitions are used unchanged, except for some changes that should't have any impact on the functionality.
22 lines
460 B
Nix
22 lines
460 B
Nix
{ config, lib, pkgs }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.services.prometheus.exporters.varnish;
|
|
in
|
|
{
|
|
port = 9131;
|
|
serviceOpts = {
|
|
path = [ pkgs.varnish ];
|
|
serviceConfig = {
|
|
DynamicUser = true;
|
|
ExecStart = ''
|
|
${pkgs.prometheus-varnish-exporter}/bin/prometheus_varnish_exporter \
|
|
-web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
|
|
${concatStringsSep " \\\n " cfg.extraFlags}
|
|
'';
|
|
};
|
|
};
|
|
}
|