1 { config, lib, pkgs, options, ... }:
4 cfg = config.services.prometheus.exporters.graphite;
5 format = pkgs.formats.yaml { };
10 graphitePort = lib.mkOption {
11 type = lib.types.port;
14 Port to use for the graphite server.
17 mappingSettings = lib.mkOption {
18 type = lib.types.submodule {
19 freeformType = format.type;
24 Mapping configuration for the exporter, see
25 <https://github.com/prometheus/graphite_exporter#yaml-config> for
33 ${pkgs.prometheus-graphite-exporter}/bin/graphite_exporter \
34 --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
35 --graphite.listen-address ${cfg.listenAddress}:${toString cfg.graphitePort} \
36 --graphite.mapping-config ${format.generate "mapping.yml" cfg.mappingSettings} \
37 ${lib.concatStringsSep " \\\n " cfg.extraFlags}