Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_openvpnas.sh
Provides performance data to enable graph generation.
Written in bash, requires to be run over ssh.
Uses sacli to get licensed connections, licence usage and checks for licence expiry. (LicUsage, VPNSummary or LICexpire)
This check needs to be run locally via the check_by_ssh plugin. As a result, you will need to have ssh keys setup. This runs as user nagios on the OpenVPN AS server, but as sacli requires root to run, two lines are required in sudo to allow this.
This plugin check now provides performance data so it can be used to create graphs.
#Check OpenVPN as parameters
define command {
command_name check_by_ssh-check_openvpnas
command_line /usr/lib/nagios/plugins/check_by_ssh -H $HOSTADDRESS$ -E -C "/home/nagios/checks/check_openvpnas.sh $ARG1$ "
}
#OpenVPN AS checks
define service{
use generic-service
host_name vpnserver
service_description Check OpenvpnAS licence usage
check_command check_by_ssh-check_openvpnas!LicUsage
contact_groups vpnadmin
}
define service{
use generic-service
host_name vpnserver
service_description Check OpenvpnAS VPN usage
check_command check_by_ssh-check_openvpnas!VPNSummary
contact_groups vpnadmin
}
define service{
use generic-service
host_name vpnserver
service_description Check OpenvpnAS licence expiry
check_command check_by_ssh-check_openvpnas!LICexpire
contact_groups vpnadmin
}
This check needs to be run locally via the check_by_ssh plugin. As a result, you will need to have ssh keys setup. This runs as user nagios on the OpenVPN AS server, but as sacli requires root to run, two lines are required in sudo to allow this.
This plugin check now provides performance data so it can be used to create graphs.
#Check OpenVPN as parameters
define command {
command_name check_by_ssh-check_openvpnas
command_line /usr/lib/nagios/plugins/check_by_ssh -H $HOSTADDRESS$ -E -C "/home/nagios/checks/check_openvpnas.sh $ARG1$ "
}
#OpenVPN AS checks
define service{
use generic-service
host_name vpnserver
service_description Check OpenvpnAS licence usage
check_command check_by_ssh-check_openvpnas!LicUsage
contact_groups vpnadmin
}
define service{
use generic-service
host_name vpnserver
service_description Check OpenvpnAS VPN usage
check_command check_by_ssh-check_openvpnas!VPNSummary
contact_groups vpnadmin
}
define service{
use generic-service
host_name vpnserver
service_description Check OpenvpnAS licence expiry
check_command check_by_ssh-check_openvpnas!LICexpire
contact_groups vpnadmin
}