Skip to content

Instantly share code, notes, and snippets.

@jazzl0ver
Created August 25, 2023 15:29
Show Gist options
  • Save jazzl0ver/017a13a1542093b51aa5469f835c8252 to your computer and use it in GitHub Desktop.
Save jazzl0ver/017a13a1542093b51aa5469f835c8252 to your computer and use it in GitHub Desktop.
Nagios NRPE monitoring of OpenVPN Access Server
command[check_ovpn_users]=read -r users max <<< "$(sudo sacli LicUsage | jq -r '.[]' | paste -d ' ' - -)"; [ $(($max-$users)) -lt 5 ] && echo "CRITICAL: OpenVPN users CRITICAL ($users/$max) | 'ovpn_users'=$users;;$max" || echo "OK: OpenVPN users OK ($users/$max) | 'ovpn_users'=$users;;$max"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment