diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-07-28 18:01:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-28 18:01:16 +0000 |
commit | 6fcda9f1ec27db14412a2103281b4b14f806066a (patch) | |
tree | 10d6f3aa9b4fc34ca27e907a5a7d199e6fca15b2 /nixos/modules | |
parent | a1d3be1d4226b7312ce6a8aa8e96a0cdbbf74243 (diff) | |
parent | 4ecfa58c97863796f407b823049bcf1bd1866aac (diff) | |
download | nixpkgs-6fcda9f1ec27db14412a2103281b4b14f806066a.tar nixpkgs-6fcda9f1ec27db14412a2103281b4b14f806066a.tar.gz nixpkgs-6fcda9f1ec27db14412a2103281b4b14f806066a.tar.bz2 nixpkgs-6fcda9f1ec27db14412a2103281b4b14f806066a.tar.lz nixpkgs-6fcda9f1ec27db14412a2103281b4b14f806066a.tar.xz nixpkgs-6fcda9f1ec27db14412a2103281b4b14f806066a.tar.zst nixpkgs-6fcda9f1ec27db14412a2103281b4b14f806066a.zip |
Merge master into staging-next
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/exporters.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/monitoring/prometheus/exporters/influxdb.nix | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index d648de6a414..9182c2f2ed8 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -33,6 +33,7 @@ let "domain" "dovecot" "fritzbox" + "influxdb" "json" "jitsi" "kea" diff --git a/nixos/modules/services/monitoring/prometheus/exporters/influxdb.nix b/nixos/modules/services/monitoring/prometheus/exporters/influxdb.nix new file mode 100644 index 00000000000..ba45173e946 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/influxdb.nix @@ -0,0 +1,34 @@ +{ config, lib, pkgs, options }: + +with lib; + +let + cfg = config.services.prometheus.exporters.influxdb; +in +{ + port = 9122; + extraOpts = { + sampleExpiry = mkOption { + type = types.str; + default = "5m"; + example = "10m"; + description = "How long a sample is valid for"; + }; + udpBindAddress = mkOption { + type = types.str; + default = ":9122"; + example = "192.0.2.1:9122"; + description = "Address on which to listen for udp packets"; + }; + }; + serviceOpts = { + serviceConfig = { + RuntimeDirectory = "prometheus-influxdb-exporter"; + ExecStart = '' + ${pkgs.prometheus-influxdb-exporter}/bin/influxdb_exporter \ + --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \ + --influxdb.sample-expiry ${cfg.sampleExpiry} ${concatStringsSep " " cfg.extraFlags} + ''; + }; + }; +} |