Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
munin plugin to count openvpn users
if [ "$1" = "config" ]; then
echo 'graph_title OpenVPN - count of users'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel count of users'
echo 'graph_category network'
echo 'graph_scale no'
echo 'run.label users'
exit 0
USERCOUNT=$( sed -e '/ROUTING TABLE/Q' /var/log/openvpn/openvpn-status.log | tail -n +4 | wc -l )
printf "run.value %s\n" $USERCOUNT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment