export openvpn status for prometheus
This commit is contained in:
parent
d0e3e2a035
commit
ad6809fc5d
1 changed files with 6 additions and 0 deletions
|
@ -30,6 +30,8 @@ let
|
||||||
reneg-sec 0
|
reneg-sec 0
|
||||||
comp-lzo no
|
comp-lzo no
|
||||||
|
|
||||||
|
status /tmp/openvpn/${name}.status
|
||||||
|
|
||||||
remote-cert-tls server
|
remote-cert-tls server
|
||||||
|
|
||||||
auth-user-pass ${authFile}
|
auth-user-pass ${authFile}
|
||||||
|
@ -232,6 +234,10 @@ in
|
||||||
in
|
in
|
||||||
lib.mkMerge (lib.mapAttrsToList instanceConfig cfg);
|
lib.mkMerge (lib.mapAttrsToList instanceConfig cfg);
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = map (name:
|
||||||
|
"d /tmp/openvpn/${name}.status 0700 root root"
|
||||||
|
) (lib.attrNames cfg);
|
||||||
|
|
||||||
networking.iproute2.enable = true;
|
networking.iproute2.enable = true;
|
||||||
networking.iproute2.rttablesExtraConfig =
|
networking.iproute2.rttablesExtraConfig =
|
||||||
lib.concatStringsSep "\n" (lib.mapAttrsToList (name: c: "10 ${name}") cfg);
|
lib.concatStringsSep "\n" (lib.mapAttrsToList (name: c: "10 ${name}") cfg);
|
||||||
|
|
Loading…
Reference in a new issue