Nagios Exchange Nagios Exchange
  • Home
  • Directory
  • Library
  • Support
  • About

Advanced Search

Build precise queries to find exactly what you need

Search Logic

Select compatible versions

Press ESC to close

Sign In Sign Up

Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More

  • Home
  • Directory
  • Library
  • Support
  • About
Plugins4404Themes and Skins13Add-ons757Graphics and Logos36View All Categories
LinuxSecuritySNMPFile SystemCloud
New Listings Recently Updated Listings Most Favored Listings Most Popular Listings Most Rated Listings Most Reviewed Listings
Random Project
Clustering and High-Availability check_cloudera_manager.pl (Advanced Nagios Plugins Collection)
0.0 (0)
22.7K
RSS Feed
Newest Listings Updated Listings
Top Contributors
Yoann LAMY (7)deskwork_itunes142 (4)Julien DESMAREST (4)Davide Lemma (3)Chad Columbus (3)
See More
Newest Contributors
signalgrid (1)Sanna Glue (2)fisherrs (1)smolinux (1)juanfertor (1)
See More

Copyright © 2009-2026 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home > Bill McGonigle
BM

Bill McGonigle

@bill_mcgonigle

User Stats

Member Since: April 30, 2012

Favorites0

Views

Projects0

No Projects Found
check_openvpn_pl

patch for OpenVPN2 point-to-point

just a quick note: put something like this in your config file to enable the management interface: management 127.0.0.1 2194 /etc/openvpn/management-password and pass the relevant options in for this probe. (put your password in that named file and get your permissions right!). I'm using OpenVPN 2.2.2 on CentOS 5 in 2012 and I needed to make a few small changes for a point-to-point link (plus a few warning message tweaks). Unified diff follows. Thank you Jamie - using the management interface is the right way to do this (my previous grep hacks were silly). ------------- --- check_openvpn.pl-dist 2012-04-30 18:21:13.000000000 -0400 +++ check_openvpn.pl 2012-04-30 18:45:07.000000000 -0400 @@ -4,6 +4,9 @@ # # Copyright (c) 2007 Jaime Gascon Romero # +# Modified 2012-04-30 Bill McGonigle +# to handle OpenVPN 2 point-to-point connection checking. +# # License Information: # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +31,7 @@ use Net::Telnet (); use Getopt::Long qw(:config no_ignore_case); use vars qw($PROGNAME $VERSION); -use lib "/usr/nagios/libexec"; +use lib "/usr/lib/nagios/plugins"; use utils qw(%ERRORS); $PROGNAME = "check_openvpn"; @@ -85,7 +88,7 @@ $t->print($opt_P); } $t->waitfor('/^$/'); -@lines = $t->cmd("status 2"); +@lines = $t->cmd("state"); $t->close; }; @@ -97,7 +100,7 @@ if (defined $opt_i || defined $opt_r) { foreach (@lines) { - if ($_ =~ /CLIENT_LIST,.*,(d+.d+.d+.d+):d+,/) { + if ($_ =~ /d+,CONNECTED,SUCCESS,d+.d+.d+.d+,(d+.d+.d+.d+)/) { push @clients_ip, $1; } } @@ -107,10 +110,10 @@ } elsif (defined $opt_r) { if ( ! grep /b$opt_rb/, @clients_ip) { if (defined $opt_c) { - print "OpenVPN CRITICAL: $opt_r don't found"; + print "OpenVPN CRITICAL: $opt_r not found"; exit $ERRORS{'CRITICAL'}; } else { - print "OpenVPN WARNING: $opt_r don't found"; + print "OpenVPN WARNING: $opt_r not found"; exit $ERRORS{'WARNING'}; } } @@ -128,10 +131,10 @@ if (defined $opt_C) { if ( ! grep /b$opt_Cb/, @clients) { if (defined $opt_c) { - print "OpenVPN CRITICAL: $opt_C don't found"; + print "OpenVPN CRITICAL: $opt_C not found"; exit $ERRORS{'CRITICAL'}; } else { - print "OpenVPN WARNING: $opt_C don't found"; + print "OpenVPN WARNING: $opt_C not found"; exit $ERRORS{'WARNING'}; } }

Reviewed 14 years ago

No Favorites Found

Copyright © 2009-2026 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home Browse Submit Profile