version 1.3, 2010/01/14 22:42:12 |
version 1.4, 2010/01/14 22:57:15 |
|
|
#!/usr/bin/perl -T |
#!/usr/bin/perl -T |
# $AFresh1: check_pf_limits,v 1.2 2010/01/14 22:37:40 andrew Exp $ |
# $AFresh1: check_pf_limits,v 1.3 2010/01/14 22:42:12 andrew Exp $ |
######################################################################## |
######################################################################## |
# check_openbgpd *** A nagios check for OpenBSD bgpd |
# check_openbgpd *** A nagios check for OpenBSD bgpd |
# |
# |
|
|
); |
); |
|
|
my %states; |
my %states; |
|
my $status = $S->{info}{Status}; |
|
if (0 == index $status, 'Enabled') { |
|
push @{ $states{OK} }, $status; |
|
} |
|
else { |
|
push @{ $states{CRITICAL} }, $status; |
|
} |
|
|
|
|
my %matched; |
my %matched; |
STATE: foreach my $k ( keys %known_limits ) { |
STATE: foreach my $k ( keys %known_limits ) { |
$matched{$k} = 1; |
$matched{$k} = 1; |
|
|
|
|
Any known limits that are unspecified are checked with the last specified |
Any known limits that are unspecified are checked with the last specified |
warning and criticical ENTRY. |
warning and criticical ENTRY. |
|
|
|
Also checks if pf is enabled and is CRITICAL if not. |
|
|
Example: |
Example: |
|
|