danfruehauf/nagios-plugins — pull request #1 by atarakt (2013-09-24 20:06:06+00:00)
Title: Add udp and ports specification for openvpn.sh

Hello,

I need to use check_vpn with an openvpn server in udp and a specific port. So I made some modification on check_vpn_plugins/openvpn.sh

* no nmap check if udp (the port seem already open, even if its close, nmap -Pn -sU -p 20000 google.com | grep -q "20000/udp open" will be open true)
* --connect-retry is a tcp only args, so I moved it on a protocol_extra_args vars.

To use this, you need to exec :

OPENVPN_PORT=443 OPENVPN_PROTOCOL=udp ./check_vpn -t openvpn -H you_server.com -u user -p password -- extra_args

Hope this script will be helpfull for another people

Nico