We have a new corporate VPN server running Ipsec (Openswan) + xl2tpd + pppd. When a user connects, pppd runs the /etc/ppp/auth-up script which logs the time and username that has connected to /var/log/pppstats. However, on our older OpenVPN system we were able to finger the OpenVPN daemon to query the number of currently connected users and this is a metric which our management require to be reported via our Zabbix monitoring servers.
It would seem relying on the log file to analyze the number of connected users to be extremely unreliable since if a user shuts down their machine without terminating the connection then we have an eternally connected user. Any ideas on how this metric could be extracted reliably as possible?