10 cfg = config.services.prometheus.exporters.graphite;
11 format = pkgs.formats.yaml { };
16 graphitePort = lib.mkOption {
17 type = lib.types.port;
20 Port to use for the graphite server.
23 mappingSettings = lib.mkOption {
24 type = lib.types.submodule {
25 freeformType = format.type;
30 Mapping configuration for the exporter, see
31 <https://github.com/prometheus/graphite_exporter#yaml-config> for
39 ${pkgs.prometheus-graphite-exporter}/bin/graphite_exporter \
40 --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
41 --graphite.listen-address ${cfg.listenAddress}:${toString cfg.graphitePort} \
42 --graphite.mapping-config ${format.generate "mapping.yml" cfg.mappingSettings} \
43 ${lib.concatStringsSep " \\\n " cfg.extraFlags}