mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
nixos/prometheus-wireguard-exporter: Add a new option to export wireguard_latest_handshake_delay_seconds
. (#419815)
This commit is contained in:
commit
e8c0884917
1 changed files with 9 additions and 0 deletions
|
@ -62,6 +62,14 @@ in
|
|||
Whether or not the remote IP of a WireGuard peer should be exposed via prometheus.
|
||||
'';
|
||||
};
|
||||
|
||||
latestHandshakeDelay = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Adds the `wireguard_latest_handshake_delay_seconds` metric that automatically calculates the seconds passed since the last handshake.
|
||||
'';
|
||||
};
|
||||
};
|
||||
serviceOpts = {
|
||||
path = [ pkgs.wireguard-tools ];
|
||||
|
@ -76,6 +84,7 @@ in
|
|||
${optionalString cfg.verbose "-v true"} \
|
||||
${optionalString cfg.singleSubnetPerField "-s true"} \
|
||||
${optionalString cfg.withRemoteIp "-r true"} \
|
||||
${optionalString cfg.latestHandshakeDelay "-d true"} \
|
||||
${optionalString (cfg.wireguardConfig != null) "-n ${escapeShellArg cfg.wireguardConfig}"}
|
||||
'';
|
||||
RestrictAddressFamilies = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue