1 -- Copyright 2015 Jo-Philipp Wich <jow@openwrt.org>
2 -- Licensed to the public under the Apache License 2.0.
9 m = Map("luci_statistics",
10 translate("OpenVPN Plugin Configuration"),
11 translate("The OpenVPN plugin gathers information about the current vpn connection status."))
13 s = m:section( NamedSection, "collectd_openvpn", "luci_statistics" )
16 o = s:option( Flag, "enable", translate("Enable this plugin") )
20 o = s:option(Flag, "CollectIndividualUsers", translate("Generate a separate graph for each logged user"))
23 o:depends("enable", 1)
26 o = s:option(Flag, "CollectUserCount", translate("Aggregate number of connected users"))
29 o:depends("enable", 1)
32 o = s:option(Flag, "CollectCompression", translate("Gather compression statistics"))
35 o:depends("enable", 1)
38 o = s:option(Flag, "ImprovedNamingSchema", translate("Use improved naming schema"))
41 o:depends("enable", 1)
44 o = s:option(DynamicList, "StatusFile", translate("OpenVPN status files"))
46 o:depends("enable", 1)
48 local status_files = nixio.fs.glob("/var/run/openvpn.*.status")
51 for status_file in status_files do