I’m looking for a decent way to monitor OpenConnect VPN server - number of currently connected sessions as a starting point. I’m using VyOS 1.5-rolling-202501110007 in my lab.
What’s the easiest approach here?
I monitor OS parameters using built-in zabbix agent already, but agent does not support system.run.
One of straightforward approaches would be ‘show openconnect-server session | grep ^sslvpn | wc -l’ via SSH, but I guess there should be other options?
I do the following: set service monitoring zabbix-agent directory '/config/zabbix/' (use whatever dir you want, but it makes sense to use something in /config so it gets copied on upgrade etc)
In my /config/zabbix I have a file called conntrack.conf with the following:
Instead of having to create a userparameter, what I prefer to do is use the net.tcp.port zabbix agent key to have it make a TCP test connection to an IP on the other end of the VPN tunnel. This does a full test without having to create a custom config on the zabbix agent.