Page 1 of 1

check_udp | openVPN | --send | --expect

Posted: Mon Mar 11, 2019 3:07 pm
by steffi
Hi.
I like to check if my openvpn server is running correctly.
When running check_udp, the script is complaining about a send or a expect String which is missing.
I guess this check is used quite often. Does anybody know what to submit as an argument for --send or --expect?

I tried --expect '1194' based on the following command, but with no success.

Code: Select all

root@fw-2018:~# nc -vz -u localhost 1194
Connection to localhost 1194 port [udp/openvpn] succeeded!
Thanks,
Steffi

Re: check_udp | openVPN | --send | --expect

Posted: Mon Mar 11, 2019 3:36 pm
by ssax
What is the output of this command?

Code: Select all

/usr/local/nagios/libexec/check_udp -H OpenVPNIP -p 1194 -s '$38$01$00$00$00$00$00$00$00' -e '' -v
You may want to take a look through these other OpenVPN plugins:

https://exchange.nagios.org/index.php?o ... rd=openvpn

Re: check_udp | openVPN | --send | --expect

Posted: Tue Mar 12, 2019 2:52 am
by steffi
Hi.
Thanks for your input. This is the output:

Code: Select all

root@fw-2018:~# /usr/lib/nagios/plugins/check_udp -H 127.0.0.1 -p 1194 -s '$38$01$00$00$00$00$00$00$00' -e '' -v
Using service UDP
Port: 1194
flags: 0x2
Send string: $38$01$00$00$00$00$00$00$00
server_expect_count: 1
        0: 
CRITICAL - Socket timeout after 10 seconds
OpenVPN server is up and running on all ports and working fine.

Thanks,
Steffi

Re: check_udp | openVPN | --send | --expect

Posted: Tue Mar 12, 2019 9:46 am
by steffi
Hi.
I switched to this check, which is working fine:
check_udp_port

Thank you for your support.
Steffi

Re: check_udp | openVPN | --send | --expect

Posted: Tue Mar 12, 2019 4:21 pm
by ssax
That's great to hear, thanks for the update! Are we okay to lock this up and mark it as resolved?