1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-01 05:19:17 +03:00
nixpkgs/nixos/modules/services/monitoring/prometheus/exporters/graphite.nix
stuebinm 6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00

41 lines
1.1 KiB
Nix

{ config, lib, pkgs, options, ... }:
let
cfg = config.services.prometheus.exporters.graphite;
format = pkgs.formats.yaml { };
in
{
port = 9108;
extraOpts = {
graphitePort = lib.mkOption {
type = lib.types.port;
default = 9109;
description = ''
Port to use for the graphite server.
'';
};
mappingSettings = lib.mkOption {
type = lib.types.submodule {
freeformType = format.type;
options = { };
};
default = { };
description = ''
Mapping configuration for the exporter, see
<https://github.com/prometheus/graphite_exporter#yaml-config> for
available options.
'';
};
};
serviceOpts = {
serviceConfig = {
ExecStart = ''
${pkgs.prometheus-graphite-exporter}/bin/graphite_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
--graphite.listen-address ${cfg.listenAddress}:${toString cfg.graphitePort} \
--graphite.mapping-config ${format.generate "mapping.yml" cfg.mappingSettings} \
${lib.concatStringsSep " \\\n " cfg.extraFlags}
'';
};
};
}