forked from lausser/check_nwc_health
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add barracuda files (not finished yet)
- Loading branch information
Showing
3 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
plugins-scripts/Classes/Barracuda/Component/FwSubsystem.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package Classes::Barracuda::Component::FwSubsystem; | ||
our @ISA = qw(Monitoring::GLPlugin::SNMP::Item); | ||
use strict; | ||
|
||
sub init { | ||
my ($self) = @_; | ||
if ($self->mode =~ /device::fw::policy::connections/) { | ||
$self->get_snmp_tables('PHION-MIB', [ | ||
['fwstats', 'fwStatsTable', 'Classes::Barracuda::Component::FwSubsystem::FWStat'], | ||
]); | ||
$self->get_snmp_objects('PHION-MIB', qw(vpnUsers)); | ||
} | ||
} | ||
|
||
|
||
package Classes::Barracuda::Component::FwSubsystem::FWStat; | ||
our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem); | ||
use strict; | ||
|
||
sub check { | ||
my ($self) = @_; | ||
$self->set_thresholds(warning => 300000, critical => 400000); | ||
$self->add_message($self->check_thresholds($self->{firewallSessions64}), | ||
sprintf 'fw has %s open sessions', $self->{firewallSessions64}); | ||
$self->add_perfdata( | ||
label => 'fw_sessions', | ||
value => $self->{firewallSessions64}, | ||
); | ||
} | ||
|
22 changes: 22 additions & 0 deletions
22
plugins-scripts/Classes/Barracuda/Component/HaSubsystem.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package Classes::Barracuda::Component::HaSubsystem; | ||
our @ISA = qw(Monitoring::GLPlugin::SNMP::Item); | ||
use strict; | ||
use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; | ||
|
||
sub init { | ||
my ($self) = @_; | ||
if ($self->mode =~ /device::ha::role/) { | ||
$self->get_snmp_tables('PHION-MIB', [ | ||
['services', 'serverServicesTable', 'Monitoring::GLPlugin::SNMP::TableItem'], | ||
]); | ||
if (! $self->opts->role()) { | ||
$self->opts->override_opt('role', 'active'); | ||
} | ||
} | ||
} | ||
|
||
sub check { | ||
my ($self) = @_; | ||
if ($self->mode =~ /device::ha::role/) { | ||
} | ||
} |