diff options
author | Jennifer Graul <jennifer.graul@wobcom.de> | 2023-08-24 14:18:09 +0200 |
---|---|---|
committer | Jennifer Graul <jennifer.graul@wobcom.de> | 2023-08-24 15:09:29 +0200 |
commit | f0b76e7d10becb4b200939f42242d2fa5d912e7b (patch) | |
tree | adcc5669f62b88593ea498ee48a7aa88002395e5 /nixos/modules/services/monitoring/vmagent.nix | |
parent | 1c7948a78096b97f00c482a09b63e0658639524b (diff) | |
download | nixlib-f0b76e7d10becb4b200939f42242d2fa5d912e7b.tar nixlib-f0b76e7d10becb4b200939f42242d2fa5d912e7b.tar.gz nixlib-f0b76e7d10becb4b200939f42242d2fa5d912e7b.tar.bz2 nixlib-f0b76e7d10becb4b200939f42242d2fa5d912e7b.tar.lz nixlib-f0b76e7d10becb4b200939f42242d2fa5d912e7b.tar.xz nixlib-f0b76e7d10becb4b200939f42242d2fa5d912e7b.tar.zst nixlib-f0b76e7d10becb4b200939f42242d2fa5d912e7b.zip |
nixos/vmagent: add extraOptions option
Diffstat (limited to 'nixos/modules/services/monitoring/vmagent.nix')
-rw-r--r-- | nixos/modules/services/monitoring/vmagent.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nixos/modules/services/monitoring/vmagent.nix b/nixos/modules/services/monitoring/vmagent.nix index c793bb073199..0e2ffb31c57c 100644 --- a/nixos/modules/services/monitoring/vmagent.nix +++ b/nixos/modules/services/monitoring/vmagent.nix @@ -62,6 +62,16 @@ in { Whether to open the firewall for the default ports. ''; }; + + extraArgs = mkOption { + type = types.listOf types.str; + default = []; + description = lib.mdDoc '' + Extra args to pass to `vmagent`. See the docs: + <https://docs.victoriametrics.com/vmagent.html#advanced-usage> + or {command}`vmagent -help` for more information. + ''; + }; }; config = mkIf cfg.enable { @@ -90,7 +100,7 @@ in { Type = "simple"; Restart = "on-failure"; WorkingDirectory = cfg.dataDir; - ExecStart = "${cfg.package}/bin/vmagent -remoteWrite.url=${cfg.remoteWriteUrl} -promscrape.config=${prometheusConfig}"; + ExecStart = "${cfg.package}/bin/vmagent -remoteWrite.url=${cfg.remoteWriteUrl} -promscrape.config=${prometheusConfig} ${escapeShellArgs cfg.extraArgs}"; }; }; |