munin plugin to count openvpn users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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 | |
fi | |
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