Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
SonicWALL VPN check
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
This script will enumerate via SNMP the currently active VPN's. It will then test against the specified VPN name to see if the VPN is active or not. If it is, it will return OK otherwise it will return CRITICAL.
This script also has the ability to list the currently active VPN's on the SonicWALL.
Usage:
check_vpn.pl -H host -C community -V vpn_name
check_vpn.pl -H host -C community -V LIST_ALL_VPNS
define command {
command_name check_vpn
command_line $USER1$/check_vpn.pl -H $HOSTADDRESS$ -C $ARG1$ -V "$ARG2$"
}
On a host:
check_vpn!community!VPN
This script also has the ability to list the currently active VPN's on the SonicWALL.
Usage:
check_vpn.pl -H host -C community -V vpn_name
check_vpn.pl -H host -C community -V LIST_ALL_VPNS
define command {
command_name check_vpn
command_line $USER1$/check_vpn.pl -H $HOSTADDRESS$ -C $ARG1$ -V "$ARG2$"
}
On a host:
check_vpn!community!VPN
Reviews (4)
bynishith, January 9, 2023
==================================
/usr/local/nagios/libexec/check_vpn.pl -H 192.168.1.1 -c nvbLu3@123 -V LIST_ALL_VPNS
request error: The requested table is empty or does not exist at /usr/local/nagios/libexec/check_vpn.pl line 84
==================================
Line No. 84 is:
$result = $session->get_table(-baseoid => $sonicSAStatPeerGateway);
die "request error: ".$session->error unless (defined $result);
Please Revert.
/usr/local/nagios/libexec/check_vpn.pl -H 192.168.1.1 -c nvbLu3@123 -V LIST_ALL_VPNS
request error: The requested table is empty or does not exist at /usr/local/nagios/libexec/check_vpn.pl line 84
==================================
Line No. 84 is:
$result = $session->get_table(-baseoid => $sonicSAStatPeerGateway);
die "request error: ".$session->error unless (defined $result);
Please Revert.
byfongang_valery, March 22, 2012
Scripts works well except that there is a little issue in the code. As it is the script will be able to list VPNs correctly but when checking a given VPN connection name, it will report VPN down even when the VPN is up. The issue here is that in the script the is a space " " added to the name value you pass on command line. To solve this modifiy the script as follows:
- search for: elsif ($name eq $vpn)
- replace with: elsif ($name eq $vpn." ")
It should just a single replacement somewhere at the end of the script.
- search for: elsif ($name eq $vpn)
- replace with: elsif ($name eq $vpn." ")
It should just a single replacement somewhere at the end of the script.
byprestigetech, January 26, 2012
The plugin works, but seem quirky and can't figure out why. Also, had to install the Net::SNMP perl module which was a fairly straightforward process.
The quirkiness seems to be related to the VPN name somehow. I had a VPN tunnel named after the peer VPN Sonicwall ID and the script gave me an error that "VPN 012A345B678D is DOWN" even though the tunnel was not down. I renamed the tunnel to "My Home" and it worked as expected. Very strange.
The quirkiness seems to be related to the VPN name somehow. I had a VPN tunnel named after the peer VPN Sonicwall ID and the script gave me an error that "VPN 012A345B678D is DOWN" even though the tunnel was not down. I renamed the tunnel to "My Home" and it worked as expected. Very strange.