version 1.6, 2015/03/25 03:17:08 |
version 1.9, 2015/03/26 04:42:23 |
|
|
#!/usr/bin/perl -T |
#!/usr/bin/perl -T |
# $RedRiver: check_openbgpd,v 1.4 2009/11/19 21:22:01 andrew Exp $ |
# $AFresh1: check_openbgpd,v 1.8 2015/03/25 02:20:06 andrew Exp $ |
######################################################################## |
######################################################################## |
# check_openbgpd *** A nagios check for OpenBSD bgpd |
# check_openbgpd *** A nagios check for OpenBSD bgpd |
# |
# |
|
|
use warnings; |
use warnings; |
|
|
use 5.010; |
use 5.010; |
|
use if $] >= 5.016, experimental => 'switch'; |
|
|
local %ENV = (); |
local %ENV = (); |
|
|
my $NAGIOS_OUTPUT = 1; |
my $NAGIOS_OUTPUT = 1; |
|
|
my $LICENSE = <<'EOL'; |
my $LICENSE = <<'EOL'; |
Copyright (c) 2009 Andrew Fresh <andrew@afresh1.com> |
Copyright (c) 2009-2015 Andrew Fresh <andrew@afresh1.com> |
Permission to use, copy, modify, and distribute this software for any |
Permission to use, copy, modify, and distribute this software for any |
purpose with or without fee is hereby granted, provided that the above |
purpose with or without fee is hereby granted, provided that the above |
copyright notice and this permission notice appear in all copies. |
copyright notice and this permission notice appear in all copies. |
|
|
state( $w, $c ); |
state( $w, $c ); |
|
|
my $opt = shift @argv; |
my $opt = shift @argv; |
given ($opt) { |
for ($opt) { |
when ( '-V' || '--version' ) { |
when ( '-V' || '--version' ) { |
print_revision( $PROGNAME, '$Revision$ ' ); |
print_revision( $PROGNAME, '$Revision$ ' ); |
exit $ERRORS{'OK'} |
exit $ERRORS{'OK'} |