This commit is contained in:
garnier-quentin 2020-07-28 10:25:35 +02:00
parent f3b1d574c8
commit ee723b48da
140 changed files with 641 additions and 1006 deletions

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(device)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|fan|voltage|misc)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan|voltage|misc)$';
$self->{cb_hook1} = 'get_version'; # before the loads

View File

@ -29,8 +29,6 @@ use apps::vmware::wsman::mode::components::resources qw($mapping_HealthState $ma
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} =
'^(omc_discretesensor|omc_fan|omc_psu|vmware_storageextent|vmware_controller|vmware_storagevolume|vmware_battery|vmware_sassataport|cim_card|cim_computersystem|cim_numericsensor|cim_memory|cim_processor|cim_recordlog)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(cim_numericsensor)$';
$self->{cb_hook1} = 'get_type';

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(global|physicaldrive|subsystem|component|temperature)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan)$';
$self->{cb_hook2} = 'snmp_execute';
@ -83,9 +82,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}
@ -133,4 +130,4 @@ Example: --critical='temperature,.*,40'
=back
=cut
=cut

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(psu)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -55,9 +53,8 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_performance => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {
});
return $self;
}
@ -100,4 +97,4 @@ Example: --threshold-overload='psu,WARNING,not operational'
=back
=cut
=cut

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(fan|psu|module)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -102,4 +100,4 @@ Example: --threshold-overload='fan,OK,inactive'
=back
=cut

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|fan|psu|sysdrive|battery)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan)$';
$self->{cb_hook2} = 'snmp_execute';
@ -96,9 +95,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|fan|psu)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan)$';
$self->{cb_hook2} = 'snmp_execute';
@ -70,9 +69,8 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {
});
return $self;
}

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(alarm|fan|sim|slot|psu|temprature|pdrive|vdrive)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature)$';
$self->{cb_hook2} = 'snmp_execute';
@ -82,9 +81,8 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {
});
return $self;
}

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(raid|psu)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan)$';
$self->{cb_hook2} = 'snmp_execute';

View File

@ -32,7 +32,6 @@ use centreon::common::cisco::smallbusiness::snmp::mode::components::resources qw
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(?:fan|psu|temperature)$';
$self->{regexp_threshold_numeric_check_section_option} = '^temperature$';
$self->{cb_hook2} = 'snmp_execute';
@ -44,13 +43,13 @@ sub set_system {
['warning', 'WARNING'],
['critical', 'CRITICAL'],
['shutdown', 'CRITICAL'],
['notFunctioning', 'CRITICAL'],
['notFunctioning', 'CRITICAL']
],
temperature => [
['ok', 'OK'],
['unavailable', 'OK'],
['nonoperational', 'CRITICAL'],
],
['nonoperational', 'CRITICAL']
]
};
$self->{components_path} = 'centreon::common::cisco::smallbusiness::snmp::mode::components';
@ -82,8 +81,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -29,7 +29,6 @@ use centreon::plugins::misc;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(fan|psu|temperature|voltage|module|physical|sensor)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|voltage|sensor.*)$';
$self->{cb_hook2} = 'snmp_execute';

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(fan|psu|temperature)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan)$';
$self->{cb_hook2} = 'snmp_execute';
@ -70,9 +69,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(fan|lcc|psu|battery|memory|cpu|iomodule|cable)$';
$self->{cb_hook2} = 'navisphere_execute';
$self->{thresholds} = {
@ -89,10 +87,9 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_performance => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"getcrus-options:s" => { name => 'getcrus_options', default => '-all' },
});
$options{options}->add_options(arguments => {
'getcrus-options:s' => { name => 'getcrus_options', default => '-all' }
});
return $self;
}
@ -129,4 +126,4 @@ If total (with skipped) is 0. (Default: 'critical' returns).
=back
=cut
=cut

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(psu|fan)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature)$';
$self->{cb_hook2} = 'snmp_execute';
@ -68,11 +67,10 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {
});
return $self;
}
@ -123,4 +121,4 @@ Set critical threshold for temperatures (syntax: type,instance,threshold)
Example: --critical='temperature,.*,40'
=back
=cut
=cut

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^sensors$';
$self->{regexp_threshold_numeric_check_section_option} = '^sensors$';
$self->{cb_hook1} = 'get_system_information';

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(?:board|fan|psu|temperature)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(?:temperature)$';
$self->{cb_hook2} = 'snmp_execute';

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(faultled)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(?:temperature)$';
$self->{cb_hook2} = 'snmp_execute';

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(chassis|drive|changer|psu)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -77,9 +75,8 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_performance => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {
});
return $self;
}
@ -117,4 +114,4 @@ Example: --threshold-overload='chassis,CRITICAL,degraded'
=back
=cut
=cut

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(?:global|microphone|camera|nic|ptc|board)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {

View File

@ -32,7 +32,6 @@ use centreon::common::radlan::snmp::mode::components::resources qw(
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(?:fan|psu|temperature)$';
$self->{regexp_threshold_numeric_check_section_option} = '^temperature$';
$self->{cb_hook2} = 'snmp_execute';

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(?:chassis|fan|temperature|psu|device)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(?:fan|temperature|psu)$';
$self->{cb_hook2} = 'execute_custom';

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(entity)$';
$self->{regexp_threshold_numeric_check_section_option} =
'^(other|unknown|temperature|voltage|current|tachometer|counter|switch|lock|humidity|smokeDetection|presence|airFlow)$';
@ -63,9 +61,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}
@ -113,4 +109,4 @@ Example: --critical='temperature,.*,30'
=back
=cut
=cut

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(vimm|ca|psu|fan|gfc|lfc)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature)$';
$self->{cb_hook2} = 'snmp_execute';

View File

@ -28,10 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
# To check with a regexp
#$self->{regexp_threshold_overload_check_section_option} = '';
#$self->{cb_threshold_overload_check_section_option} = 'callbackname';
#$self->{regexp_threshold_numeric_check_section_option} = '';
#$self->{cb_threshold_numeric_check_section_option} = 'callbackname';
@ -92,7 +88,7 @@ sub new {
if ($self->{performance} == 1) {
$options{options}->add_options(arguments => {
'warning:s@' => { name => 'warning' },
'critical:s@' => { name => 'critical' },
'critical:s@' => { name => 'critical' }
});
}
@ -101,14 +97,14 @@ sub new {
if ($self->{filter_exclude} == 1) {
$options{options}->add_options(arguments => {
'exclude:s' => { name => 'exclude' },
'filter:s@' => { name => 'filter' },
'filter:s@' => { name => 'filter' }
});
}
$self->{absent} = (defined($options{no_absent}) && $options{no_absent} == 1) ?
0 : 1;
if ($self->{absent} == 1) {
$options{options}->add_options(arguments => {
'absent-problem:s@' => { name => 'absent_problem' },
'absent-problem:s@' => { name => 'absent_problem' }
});
}
@ -126,7 +122,7 @@ sub new {
foreach my $component (@{$self->{components_module}}) {
$options{options}->add_options(arguments => {
'warning-count-' . $component . ':s' => { name => 'warning_count_' . $component },
'critical-count-' . $component . ':s' => { name => 'critical_count_' . $component },
'critical-count-' . $component . ':s' => { name => 'critical_count_' . $component }
});
}
}
@ -181,23 +177,12 @@ sub check_options {
} else {
($section, $instance, $status, $filter) = @values;
}
if (defined($self->{regexp_threshold_overload_check_section_option}) &&
$section !~ /$self->{regexp_threshold_overload_check_section_option}/) {
$self->{output}->add_option_msg(short_msg => "Wrong threshold-overload section '" . $val . "'.");
$self->{output}->option_exit();
}
$self->call_object_callback(
method_name => $self->{cb_threshold_overload_check_section_option},
section => $section,
option_value => $val
);
if ($self->{output}->is_litteral_status(status => $status) == 0) {
$self->{output}->add_option_msg(short_msg => "Wrong threshold-overload status '" . $val . "'.");
$self->{output}->option_exit();
}
$self->{overload_th}->{$section} = [] if (!defined($self->{overload_th}->{$section}));
push @{$self->{overload_th}->{$section}}, {filter => $filter, status => $status, instance => $instance };
push @{$self->{overload_th}}, { section => $section, filter => $filter, status => $status, instance => $instance };
}
if ($self->{performance} == 1) {
@ -466,9 +451,9 @@ sub get_severity {
my ($self, %options) = @_;
my $status = 'UNKNOWN'; # default
if (defined($self->{overload_th}->{$options{section}})) {
foreach (@{$self->{overload_th}->{$options{section}}}) {
if ($options{value} =~ /$_->{filter}/i &&
foreach (@{$self->{overload_th}}) {
if ($options{section} =~ /$_->{section}/i) {
if ($options{value} =~ /$_->{filter}/i &&
(!defined($options{instance}) || $options{instance} =~ /$_->{instance}/)) {
$status = $_->{status};
return $status;

View File

@ -108,7 +108,7 @@ sub check_options {
$self->{psql_cmd} = $self->{option_results}->{psql_cmd};
# If we want a command line: password with variable "PGPASSWORD".
# psql -d template1 -A -R '-====-' -F '#====#' -c "select code from films"
# psql -d template1 -A -R "-====-" -F "#====#" -c "select code from films"
if (!defined($self->{host}) || $self->{host} eq '') {
$self->{output}->add_option_msg(short_msg => "Need to specify host argument.");
@ -182,21 +182,13 @@ sub quote {
sub command_execution {
my ($self, %options) = @_;
my ($lerror, $stdout, $exit_code) = centreon::plugins::misc::backtick(
command => $self->{psql_cmd},
arguments => [@{$self->{args}}, '-c', $options{request}],
timeout => 30,
wait_exit => 1,
redirect_stderr => 1
);
if ($exit_code <= -1000) {
if ($exit_code == -1000) {
$self->{output}->output_add(severity => 'UNKNOWN',
short_msg => $stdout);
}
$self->{output}->display();
$self->{output}->exit();
}
my ($stdout, $exit_code) = centreon::plugins::misc::execute(
command => $self->{psql_cmd},
command_options => join(' ', @{$self->{args}}) . ' -c "' . $options{request} . '"',
wait_exit => 1,
redirect_stderr => 1,
options => { timeout => 30 }
);
return ($exit_code, $stdout);
}

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(entity)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -46,8 +44,8 @@ sub set_system {
['fail', 'CRITICAL'],
['ok', 'OK'],
['inSync', 'OK'],
['outOfSync', 'CRITICAL'],
],
['outOfSync', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::ats::apc::snmp::mode::components';
@ -56,7 +54,7 @@ sub set_system {
sub snmp_execute {
my ($self, %options) = @_;
$self->{snmp} = $options{snmp};
$self->{results} = $self->{snmp}->get_multiple_table(oids => $self->{request});
}
@ -65,11 +63,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_performance => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}
@ -106,4 +102,4 @@ Example: --threshold-overload='entity,SourceBStatus,WARNING,fail'
=back
=cut
=cut

View File

@ -27,9 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(simple|multiple)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -37,12 +35,12 @@ sub set_system {
['true', 'CRITICAL'],
['false', 'OK'],
['on', 'CRITICAL'],
['off', 'OK'],
['off', 'OK']
],
multiple => [
['true', 'CRITICAL'],
['false', 'OK'],
],
['false', 'OK']
]
};
$self->{components_path} = 'hardware::devices::aeg::acm::snmp::mode::components';
@ -60,10 +58,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_performance => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,19 +27,17 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^service|sdcard$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
service => [
['low', 'OK'],
['high', 'CRITICAL'],
['high', 'CRITICAL']
],
sdcard => [
['normal', 'OK'],
['fail', 'CRITICAL'],
],
['fail', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::devices::camera::hanwha::snmp::mode::components';
@ -58,9 +56,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1, no_performance => 1, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,9 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} =
'^(?:ad|aic|aoc|camera|st|software|temperature|vic|vis|voc|webex)';
$self->{regexp_threshold_numeric_check_section_option} = '^(?:aiclatency|aocdelay)$';
$self->{cb_hook2} = 'execute_custom';
@ -38,16 +36,16 @@ sub set_system {
connection_status => [
['NotConnected', 'OK'],
['Connected', 'OK'],
['Unknown', 'UNKNOWN'],
['Unknown', 'UNKNOWN']
],
connected => [
['True', 'OK'],
['False', 'WARNING'],
['Unknown', 'UNKNOWN'],
['Unknown', 'UNKNOWN']
],
temperature => [
['Normal', 'OK'],
['.*', 'CRITICAL'],
['.*', 'CRITICAL']
],
software_status => [
['None', 'OK'],

View File

@ -28,8 +28,7 @@ use centreon::plugins::misc;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(hwstatus|temperature|memory)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|memory)$';
$self->{cb_hook2} = 'cmd_execute';
@ -37,8 +36,8 @@ sub set_system {
$self->{thresholds} = {
hwstatus => [
['BATTERY OK', 'OK'],
['.*', 'CRITICAL'],
],
['.*', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::devices::safenet::hsm::protecttoolkit::mode::components';
@ -48,12 +47,15 @@ sub set_system {
sub cmd_execute {
my ($self, %options) = @_;
($self->{stdout}) = centreon::plugins::misc::execute(output => $self->{output},
options => $self->{option_results},
sudo => $self->{option_results}->{sudo},
command => $self->{option_results}->{command},
command_path => $self->{option_results}->{command_path},
command_options => $self->{option_results}->{command_options});
($self->{stdout}) = centreon::plugins::misc::execute(
output => $self->{output},
options => $self->{option_results},
sudo => $self->{option_results}->{sudo},
command => $self->{option_results}->{command},
command_path => $self->{option_results}->{command_path},
command_options => $self->{option_results}->{command_options}
);
$self->{stdout} =~ s/\r//msg;
my ($model, $firmware, $fm_status, $transport_mode, $security_mode) = ('unknown', 'unknown', 'unknown', 'unknown', 'unknown');
$model = $1 if ($self->{stdout} =~ /^Model\s+:\s+(.*?)\s*\n/msi);
@ -68,30 +70,30 @@ sub cmd_execute {
sub display {
my ($self, %options) = @_;
$self->{output}->output_add(severity => 'OK',
short_msg => sprintf("Hardware status is OK")
);
$self->{output}->output_add(
severity => 'OK',
short_msg => sprintf("Hardware status is OK")
);
}
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"hostname:s" => { name => 'hostname' },
"remote" => { name => 'remote' },
"ssh-option:s@" => { name => 'ssh_option' },
"ssh-path:s" => { name => 'ssh_path' },
"ssh-command:s" => { name => 'ssh_command', default => 'ssh' },
"timeout:s" => { name => 'timeout', default => 30 },
"sudo" => { name => 'sudo' },
"command:s" => { name => 'command', default => 'ctconf' },
"command-path:s" => { name => 'command_path' },
"command-options:s" => { name => 'command_options', default => '-v' },
});
$options{options}->add_options(arguments => {
'hostname:s' => { name => 'hostname' },
'remote' => { name => 'remote' },
'ssh-option:s@' => { name => 'ssh_option' },
'ssh-path:s' => { name => 'ssh_path' },
'ssh-command:s' => { name => 'ssh_command', default => 'ssh' },
'timeout:s' => { name => 'timeout', default => 30 },
'sudo' => { name => 'sudo' },
'command:s' => { name => 'command', default => 'ctconf' },
'command-path:s' => { name => 'command_path' },
'command-options:s' => { name => 'command_options', default => '-v' }
});
return $self;
}

View File

@ -27,8 +27,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(video|fan|psu|temperature|audio|storage|casing)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature)$';
@ -37,35 +35,35 @@ sub set_system {
$self->{thresholds} = {
video => [
['signalOk', 'OK'],
['noSignal', 'CRITICAL'],
['noSignal', 'CRITICAL']
],
psu => [
['failure', 'CRITICAL'],
['failure', 'CRITICAL']
['ok', 'OK'],
],
fan => [
['failed', 'CRITICAL'],
['ok', 'OK'],
['ok', 'OK']
],
temperature => [
['failed', 'CRITICAL'],
['outOfBoundary', 'CRITICAL'],
['ok', 'OK'],
['ok', 'OK']
],
audio => [
['signalOk', 'OK'],
['noSignal', 'CRITICAL'],
['noSignal', 'CRITICAL']
],
storage => [
['yes', 'OK'],
['no', 'CRITICAL'],
['no', 'CRITICAL']
],
casing => [
['open', 'OK'],
['closed', 'WARNING'],
],
['closed', 'WARNING']
]
};
$self->{components_path} = 'hardware::devices::video::axis::snmp::mode::components';
$self->{components_module} = ['video', 'psu', 'fan', 'temperature', 'audio', 'storage', 'casing'];
}
@ -81,10 +79,8 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}
@ -127,4 +123,4 @@ Example: --threshold-overload='video,CRITICAL,^(?!(good)$)'
=back
=cut
=cut

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(psu)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -56,8 +54,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_performance => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(psu)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -46,7 +44,7 @@ sub set_system {
sub snmp_execute {
my ($self, %options) = @_;
$self->{snmp} = $options{snmp};
$self->{results} = $self->{snmp}->get_multiple_table(oids => $self->{request});
}
@ -56,8 +54,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_performance => 1, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^humidity|temperature|psu$';
$self->{regexp_threshold_numeric_check_section_option} = '^humidity|temperature$';
$self->{cb_hook2} = 'snmp_execute';
@ -40,7 +39,7 @@ sub set_system {
['belowLow', 'WARNING'],
['normal', 'OK'],
['aboveHigh', 'WARNING'],
['aboveMax', 'CRITICAL'],
['aboveMax', 'CRITICAL']
],
temperature => [
['notPresent', 'OK'],
@ -48,13 +47,13 @@ sub set_system {
['belowLow', 'WARNING'],
['normal', 'OK'],
['aboveHigh', 'WARNING'],
['aboveMax', 'CRITICAL'],
['aboveMax', 'CRITICAL']
],
psu => [
['ok', 'OK'],
['failed', 'CRITICAL'],
['notPresent', 'OK'],
],
['notPresent', 'OK']
]
};
$self->{components_path} = 'hardware::pdu::apc::snmp::mode::components';
@ -72,9 +71,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -29,7 +29,6 @@ use hardware::pdu::schleifenbauer::gateway::snmp::mode::components::resources qw
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|humidity|contact)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|humidity|contact)$';
$self->{cb_hook2} = 'snmp_execute';
@ -44,7 +43,7 @@ sub snmp_execute {
$self->{snmp} = $options{snmp};
$self->{results} = $self->{snmp}->get_multiple_table(oids => [
{ oid => $oid_deviceName },
{ oid => $oid_pdumeasuresEntry },
{ oid => $oid_pdumeasuresEntry }
]);
}
@ -53,8 +52,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|humidity|switch|serial|water)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|humidity)$';
$self->{cb_hook2} = 'snmp_execute';
@ -43,23 +42,23 @@ sub set_system {
['lowCritical', 'CRITICAL'],
['sensorError', 'CRITICAL'],
['relayOn', 'OK'],
['relayOff', 'OK'],
['relayOff', 'OK']
],
default2 => [
['noStatus', 'OK'],
['normal', 'OK'],
['critical', 'CRITICAL'],
['sensorError', 'CRITICAL'],
],
['sensorError', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::sensors::akcp::snmp::mode::components';
$self->{components_module} = ['temperature', 'humidity', 'switch', 'serial', 'water'];
}
sub snmp_execute {
my ($self, %options) = @_;
$self->{snmp} = $options{snmp};
$self->{results} = $self->{snmp}->get_multiple_table(oids => $self->{request});
}
@ -68,11 +67,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,8 +28,7 @@ use hardware::sensors::hwgste::snmp::mode::components::resources qw($mapping);
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|humidity)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|humidity)$';
$self->{cb_hook2} = 'snmp_execute';
@ -41,17 +40,17 @@ sub set_system {
['outOfRangeLo', 'WARNING'],
['outOfRangeHi', 'WARNING'],
['alarmLo', 'CRITICAL'],
['alarmHi', 'CRITICAL'],
],
['alarmHi', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::sensors::hwgste::snmp::mode::components';
$self->{components_module} = ['temperature', 'humidity'];
}
sub snmp_execute {
my ($self, %options) = @_;
$self->{snmp} = $options{snmp};
$self->{results} = $self->{snmp}->get_multiple_table(
oids => [{ oid => $mapping->{branch_sensors}->{hwgste} }, { oid => $mapping->{branch_sensors}->{hwgste2} }]
@ -67,10 +66,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|humidity|input)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|humidity)$';
$self->{cb_hook2} = 'snmp_execute';
@ -42,12 +41,12 @@ sub set_system {
['below-low-critical', 'CRITICAL'],
['above-high-warning', 'WARNING'],
['above-high-critical', 'CRITICAL'],
['sensorError', 'CRITICAL'],
['sensorError', 'CRITICAL']
],
input => [
['normal', 'OK'],
['triggered', 'CRITICAL'],
],
['triggered', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::sensors::jacarta::snmp::mode::components';
@ -70,10 +69,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|humidity|dewpoint|airflow|doorswitch|camera|otherstate)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|humidity|dewpoint|airflow)$';
$self->{cb_hook1} = 'get_version';
@ -41,8 +40,8 @@ sub set_system {
['warning', 'WARNING'],
['error', 'CRITICAL'],
['critical', 'CRITICAL'],
['failure', 'CRITICAL'],
],
['failure', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::sensors::netbotz::snmp::mode::components';
@ -84,8 +83,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^sp|temperature|humidity|switch$';
$self->{regexp_threshold_numeric_check_section_option} = '^humidity|temperature$';
$self->{cb_hook2} = 'snmp_execute';
@ -39,7 +38,7 @@ sub set_system {
['normal', 'OK'],
['warning', 'WARNING'],
['critical', 'CRITICAL'],
['sensorError', 'CRITICAL'],
['sensorError', 'CRITICAL']
],
switch => [
['noStatus', 'UNKNOWN'],
@ -48,10 +47,10 @@ sub set_system {
['lowCritical', 'CRITICAL'],
['sensorError', 'CRITICAL'],
['relayOn', 'OK'],
['relayOff', 'OK'],
],
['relayOff', 'OK']
]
};
$self->{components_path} = 'hardware::sensors::sensorip::snmp::mode::components';
$self->{components_module} = ['sp', 'temperature', 'humidity', 'switch'];
}
@ -67,9 +66,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^sensors$';
$self->{regexp_threshold_numeric_check_section_option} = '^sensors$';
$self->{cb_hook2} = 'snmp_execute';
@ -36,10 +35,10 @@ sub set_system {
$self->{thresholds} = {
output => [
['open', 'CRITICAL'],
['close', 'OK'],
],
['close', 'OK']
]
};
$self->{components_path} = 'hardware::sensors::serverscheck::sensorgateway::snmp::mode::components';
$self->{components_module} = ['sensors'];
}
@ -55,9 +54,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -29,8 +29,6 @@ use hardware::server::cisco::ucs::mode::components::resources qw($thresholds);
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(fan|psu|chassis|iocard|blade|fex|cpu|memory|localdisk)\.(presence|operability|overall_status)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = $thresholds;
@ -51,8 +49,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_performance => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,8 +28,7 @@ use centreon::plugins::misc;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(health|chassis|temperature|psu)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|psu\.(voltage|power|current)|chassis\.(power|current))$';
$self->{cb_hook2} = 'snmp_execute';
@ -41,8 +40,8 @@ sub set_system {
['ok', 'OK'],
['nonCritical', 'WARNING'],
['critical', 'CRITICAL'],
['nonRecoverable', 'CRITICAL'],
],
['nonRecoverable', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::server::dell::cmc::snmp::mode::components';
@ -78,9 +77,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,9 +27,9 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|voltage|amperage|coolingdevice)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -37,7 +37,7 @@ sub set_system {
['unknown', 'UNKNOWN'],
['enabled', 'OK'],
['notReady', 'WARNING'],
['enabledAndNotReady', 'WARNING'],
['enabledAndNotReady', 'WARNING']
],
'default.status' => [
['other', 'UNKNOWN'],
@ -45,7 +45,7 @@ sub set_system {
['ok', 'OK'],
['nonCritical', 'WARNING'],
['critical', 'CRITICAL'],
['nonRecoverable', 'CRITICAL'],
['nonRecoverable', 'CRITICAL']
],
'probe.status' => [
['other', 'UNKNOWN'],
@ -57,7 +57,7 @@ sub set_system {
['nonCriticalLower', 'WARNING'],
['criticalLower', 'CRITICAL'],
['nonRecoverableLower', 'CRITICAL'],
['failed', 'CRITICAL'],
['failed', 'CRITICAL']
],
'pdisk.state' => [
['unknown', 'UNKNOWN'],
@ -69,31 +69,26 @@ sub set_system {
['failed', 'CRITICAL'],
['non-raid', 'OK'],
['removed', 'OK'],
['readonly', 'WARNING'],
['readonly', 'WARNING']
],
'pdisk.smartalert' => [
['off', 'OK'],
['on', 'WARNING'],
['on', 'WARNING']
],
'vdisk.state' => [
['unknown', 'UNKNOWN'],
['online', 'OK'],
['failed', 'CRITICAL'],
['degraded', 'WARNING'],
],
['degraded', 'WARNING']
]
};
$self->{components_path} = 'hardware::server::dell::idrac::snmp::mode::components';
$self->{components_module} = ['psu', 'punit', 'temperature', 'voltage', 'amperage',
$self->{components_module} = [
'psu', 'punit', 'temperature', 'voltage', 'amperage',
'systembattery', 'coolingunit', 'coolingdevice', 'processor', 'memory', 'pci', 'network',
'slot', 'fru', 'storagectrl', 'storagebattery', 'pdisk', 'vdisk'];
$self->{regexp_threshold_overload_check_section_option} =
'^(' .
'(psu|punit|temperature|voltage|amperage|systembattery|coolingunit|coolingdevice|processor|memory|pci|network|slot|fru|storagectrl|storagebattery|pdisk)\.status' .
'|(punit|temperature|voltage|amperage|systembattery|coolingunit|coolingdevice|processor|memory|pci|pdisk|vdisk)\.state' .
'|(pdisk)\.smartalert' .
')$';
'slot', 'fru', 'storagectrl', 'storagebattery', 'pdisk', 'vdisk'
];
}
sub snmp_execute {
@ -107,11 +102,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,9 +28,7 @@ use centreon::plugins::misc;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} =
'^(globalstatus|fan|psu|temperature|cpu|cachebattery|memory|physicaldisk|logicaldrive|esmlog|battery|controller|connector)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan|psu\.power)$';
$self->{cb_hook2} = 'snmp_execute';
@ -47,8 +45,8 @@ sub set_system {
],
physicaldisk_smartalert => [
['yes', 'WARNING'],
['no', 'OK'],
],
['no', 'OK']
]
};
$self->{components_path} = 'hardware::server::dell::openmanage::snmp::mode::components';
@ -79,9 +77,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|fan|psu|voltage|cpu|memory)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan|voltage|power)$';
$self->{cb_hook2} = 'snmp_execute';
@ -46,7 +45,7 @@ sub set_system {
['hot-spare', 'OK'],
['mirror', 'OK'],
['raid', 'OK'],
['hidden', 'OK'],
['hidden', 'OK']
],
cpu => [
['unknown', 'UNKNOWN'],
@ -56,7 +55,7 @@ sub set_system {
['error', 'CRITICAL'],
['prefailure-warning', 'WARNING'],
['fail', 'CRITICAL'], # can be failed also
['missing-termination', 'WARNING'],
['missing-termination', 'WARNING']
],
voltage => [
['unknown', 'UNKNOWN'],
@ -66,7 +65,7 @@ sub set_system {
['too-high', 'WARNING'],
['out-of-range', 'CRITICAL'],
['battery-prefailure', 'CRITICAL'],
['warning', 'WARNING'],
['warning', 'WARNING']
],
fan => [
['unknown', 'UNKNOWN'],
@ -92,7 +91,7 @@ sub set_system {
['not-available', 'OK'],
['temperature-warning', 'WARNING'], # can be also temperature-warning-toohot
['temperature-critical-toohot', 'CRITICAL'],
['temperature-normal', 'OK'],
['temperature-normal', 'OK']
],
psu => [
['unknown', 'UNKNOWN'],
@ -110,8 +109,8 @@ sub set_system {
['non-redundant-ac-fail', 'WARNING'],
['degraded', 'WARNING'],
['critical', 'CRITICAL'],
],
['critical', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::server::fujitsu::snmp::mode::components';
@ -120,7 +119,7 @@ sub set_system {
sub snmp_execute {
my ($self, %options) = @_;
$self->{snmp} = $options{snmp};
$self->{results} = $self->{snmp}->get_multiple_table(oids => $self->{request});
}
@ -129,11 +128,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,9 +28,6 @@ use centreon::plugins::misc;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} =
'^(enclosure|manager|fan|blade|network|psu|temperature|fuse)$';
$self->{cb_hook2} = 'snmp_execute';
@ -39,8 +36,8 @@ sub set_system {
['other', 'CRITICAL'],
['ok', 'OK'],
['degraded', 'WARNING'],
['failed', 'CRITICAL'],
],
['failed', 'CRITICAL']
]
};
$self->{components_exec_load} = 0;
@ -61,9 +58,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_performance => 1);
bless $self, $class;
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,9 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} =
'^(temperature|fan|vrm|psu|cpu|memory|nic|battery|ctrl|driveencl|pdrive|ldrive|bios)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan)$';
$self->{cb_hook2} = 'api_execute';
@ -43,19 +41,21 @@ sub set_system {
['NOT APPLICABLE', 'OK'],
['n/a', 'OK'],
['Unknown', 'UNKNOWN'],
['.*', 'CRITICAL'],
['.*', 'CRITICAL']
],
nic => [
['Ok', 'OK'],
['Unknown', 'OK'],
['Disabled', 'OK'],
['.*', 'CRITICAL'],
],
['.*', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::server::hp::ilo::xmlapi::mode::components';
$self->{components_module} = ['fan', 'temperature', 'vrm', 'psu', 'cpu', 'memory', 'nic', 'battery', 'ctrl',
'driveencl', 'pdrive', 'ldrive', 'bios'];
$self->{components_module} = [
'fan', 'temperature', 'vrm', 'psu', 'cpu', 'memory', 'nic', 'battery', 'ctrl',
'driveencl', 'pdrive', 'ldrive', 'bios'
];
}
sub api_execute {
@ -68,10 +68,8 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(?:server|enclosure\.(.*))$';
$self->{cb_hook2} = 'execute_custom';
@ -38,8 +36,8 @@ sub set_system {
['disabled', 'OK'],
['critical', 'CRITICAL'],
['warning', 'WARNING'],
['unknown', 'UNKNOWN'],
],
['unknown', 'UNKNOWN']
]
};
$self->{components_path} = 'hardware::server::hp::oneview::restapi::mode::components';
@ -50,7 +48,7 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_performance => 1, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {});
$self->{requests} = [];

View File

@ -28,9 +28,7 @@ use centreon::plugins::misc;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} =
'^(ilo|cpu|idectl|ideldrive|idepdrive|pc|psu|sasctl|sasldrive|saspdrive|scsictl|scsildrive|scsipdrive|fcahostctl|fcaexternalctl|fcaexternalacc|fcaldrive|fcapdrive|dactl|daacc|daldrive|dapdrive|fan|pnic|lnic|temperature)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature)$';
$self->{cb_hook1} = 'get_system_information';
@ -42,14 +40,14 @@ sub set_system {
['ok', 'OK'],
['degraded', 'WARNING'],
['failed', 'CRITICAL'],
['disabled', 'OK'],
['disabled', 'OK']
],
ideldrive => [
['other', 'UNKNOWN'],
['ok', 'OK'],
['rebuilding', 'WARNING'],
['degraded', 'WARNING'],
['failed', 'CRITICAL'],
['failed', 'CRITICAL']
],
sasldrive => [
['other', 'UNKNOWN'],
@ -57,7 +55,7 @@ sub set_system {
['degraded', 'WARNING'],
['rebuilding', 'WARNING'],
['failed', 'CRITICAL'],
['offline', 'CRITICAL'],
['offline', 'CRITICAL']
],
scsildrive => [
['other', 'UNKNOWN'],
@ -70,7 +68,7 @@ sub set_system {
['rebuilding', 'WARNING'],
['wrongDrive', 'CRITICAL'],
['badConnect', 'CRITICAL'],
['disabled', 'OK'],
['disabled', 'OK']
],
fcaexternalaccbattery => [
['other', 'UNKNOWN'],
@ -78,7 +76,7 @@ sub set_system {
['degraded', 'WARNING'],
['failed', 'CRITICAL'],
['recharging', 'WARNING'],
['not present', 'OK'],
['not present', 'OK']
],
fcaldrive => [
['other', 'UNKNOWN'],
@ -95,7 +93,7 @@ sub set_system {
['notAvailable', 'WARNING'],
['hardError', 'CRITICAL'],
['queuedForExpansion', 'WARNING'],
['shutdown', 'WARNING'],
['shutdown', 'WARNING']
],
daaccbattery => [
['other', 'UNKNOWN'],
@ -103,7 +101,7 @@ sub set_system {
['degraded', 'WARNING'],
['failed', 'CRITICAL'],
['recharging', 'WARNING'],
['not present', 'OK'],
['not present', 'OK']
],
daldrive => [
['other', 'UNKNOWN'],
@ -120,39 +118,41 @@ sub set_system {
['notAvailable', 'WARNING'],
['hardError', 'CRITICAL'],
['queuedForExpansion', 'WARNING'],
['shutdown', 'WARNING'],
['shutdown', 'WARNING']
],
lnic => [
['other', 'OK'],
['ok', 'OK'],
['degraded', 'WARNING'],
['failed', 'CRITICAL'],
['failed', 'CRITICAL']
],
temperature => [
['other', 'OK'],
['ok', 'OK'],
['degraded', 'WARNING'],
['failed', 'CRITICAL'],
['failed', 'CRITICAL']
],
# ilo, pnic, fan, dapdrive, daacc, dactl, fcapdrive, fcaexternalacc, fcaexternalctl, fcahostctl, scsipdrive, scsictl, saspdrive, sasctl, psu, pc, idepdrive, idectl
default => [
['other', 'UNKNOWN'],
['ok', 'OK'],
['degraded', 'WARNING'],
['failed', 'CRITICAL'],
],
['failed', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::server::hp::proliant::snmp::mode::components';
$self->{components_module} = ['cpu', 'idectl', 'ideldrive', 'idepdrive', 'pc', 'psu',
$self->{components_module} = [
'cpu', 'idectl', 'ideldrive', 'idepdrive', 'pc', 'psu',
'sasctl', 'sasldrive', 'saspdrive', 'scsictl', 'scsildrive', 'scsipdrive',
'fcahostctl', 'fcaexternalctl', 'fcaexternalacc', 'fcaldrive', 'fcapdrive',
'dactl', 'daacc', 'daldrive', 'dapdrive', 'fan', 'pnic', 'lnic', 'temperature', 'ilo'];
'dactl', 'daacc', 'daldrive', 'dapdrive', 'fan', 'pnic', 'lnic', 'temperature', 'ilo'
];
}
sub snmp_execute {
my ($self, %options) = @_;
$self->{snmp} = $options{snmp};
$self->{results} = $self->{snmp}->get_multiple_table(oids => $self->{request});
}
@ -161,11 +161,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}
@ -248,4 +246,4 @@ Example: --critical='temperature,.*,40'
=back
=cut
=cut

View File

@ -27,19 +27,18 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_numeric_check_section_option} = '^(cpu|temperature)$';
$self->{regexp_threshold_overload_check_section_option} = '^(cpu|disk|memory|mezz|raidcontroller)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
'default' => [
['normal', 'OK'],
['minor', 'WARNING'],
['major', 'CRITICAL'],
['critical', 'CRITICAL'],
],
['critical', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::server::huawei::hmm::snmp::mode::components';
@ -57,12 +56,11 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"blade-id:s" => { name => 'blade_id' },
});
$options{options}->add_options(arguments => {
'blade-id:s' => { name => 'blade_id' }
});
return $self;
}

View File

@ -27,9 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(blade|fan|psu|switch)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -37,8 +35,8 @@ sub set_system {
['normal', 'OK'],
['minor', 'WARNING'],
['major', 'CRITICAL'],
['critical', 'CRITICAL'],
],
['critical', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::server::huawei::hmm::snmp::mode::components';
@ -56,11 +54,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,9 +27,8 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_numeric_check_section_option} = '^(harddisk|fan|psu|temperature)$';
$self->{regexp_threshold_overload_check_section_option} = '^(component|cpu|harddisk|fan|logicaldrive|memory|pcie|psu|raidcontroller)$';
$self->{cb_hook2} = 'snmp_execute';
@ -40,14 +39,14 @@ sub set_system {
['major', 'CRITICAL'],
['critical', 'CRITICAL'],
['absence', 'UNKNOWN'],
['unknown', 'UNKNOWN'],
['unknown', 'UNKNOWN']
],
'logicaldrive' => [
['offline', 'OK'],
['partial degraded', 'WARNING'],
['degraded', 'CRITICAL'],
['optimal', 'OK'],
['unknown', 'UNKNOWN'],
['unknown', 'UNKNOWN']
],
'raidcontroller' => [
['memory correctable error', 'WARNING'],
@ -55,13 +54,15 @@ sub set_system {
['memory ECC error reached limit', 'CRITICAL'],
['NVRAM uncorrectable error', 'CRITICAL'],
['ok', 'OK'],
['unknown', 'UNKNOWN'],
],
['unknown', 'UNKNOWN']
]
};
$self->{components_path} = 'hardware::server::huawei::ibmc::snmp::mode::components';
$self->{components_module} = ['component', 'cpu', 'harddisk', 'fan', 'logicaldrive',
'memory', 'pcie', 'psu', 'raidcontroller', 'temperature'];
$self->{components_module} = [
'component', 'cpu', 'harddisk', 'fan', 'logicaldrive',
'memory', 'pcie', 'psu', 'raidcontroller', 'temperature'
];
}
sub snmp_execute {
@ -75,11 +76,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,10 +27,9 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(global|temperature|voltage|fan)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|voltage|fan)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -38,12 +37,12 @@ sub set_system {
['non recoverable', 'CRITICAL'],
['non critical', 'WARNING'],
['critical', 'CRITICAL'],
['nominal', 'OK'],
['nominal', 'OK']
],
fan => [
['offline', 'WARNING'],
['.*', 'OK'],
],
['.*', 'OK']
]
};
$self->{components_path} = 'hardware::server::ibm::mgmt_cards::imm::snmp::mode::components';
@ -52,7 +51,7 @@ sub set_system {
sub snmp_execute {
my ($self, %options) = @_;
$self->{snmp} = $options{snmp};
$self->{results} = $self->{snmp}->get_multiple_table(oids => $self->{request});
}
@ -61,11 +60,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|voltage|fan|psu|disk|raidvolume)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|voltage|fan)$';
$self->{cb_hook2} = 'snmp_execute';
@ -36,14 +35,14 @@ sub set_system {
$self->{thresholds} = {
default => [
['Normal', 'OK'],
['.*', 'CRITICAL'],
['.*', 'CRITICAL']
],
raidvolume => [
['Optimal', 'OK'],
['.*', 'CRITICAL'],
],
['.*', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::server::lenovo::xcc::snmp::mode::components';
$self->{components_module} = ['temperature', 'voltage', 'fan', 'psu', 'disk', 'raidvolume'];
}
@ -59,11 +58,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,9 +28,6 @@ use centreon::plugins::misc;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} =
'^temperature|si|disk|fan|voltage|psu|sensors$';
$self->{cb_hook2} = 'execute_command';
@ -39,34 +36,34 @@ sub set_system {
$self->{thresholds} = {
temperature => [
['^(?!(OK)$)', 'CRITICAL'],
['^OK$', 'OK'],
['^OK$', 'OK']
],
si => [
['^(?!(OFF)$)', 'CRITICAL'],
['^OFF$', 'OK'],
['^OFF$', 'OK']
],
disk => [
['^(?!(OK|NOT PRESENT)$)', 'CRITICAL'],
['^OK|NOT PRESENT$', 'OK'],
['^OK|NOT PRESENT$', 'OK']
],
fan => [
['^(?!(OK|NOT PRESENT)$)', 'CRITICAL'],
['^OK|NOT PRESENT$', 'OK'],
['^OK|NOT PRESENT$', 'OK']
],
voltage => [
['^(?!(OK)$)', 'CRITICAL'],
['^OK$', 'OK'],
['^OK$', 'OK']
],
psu => [
['^(?!(OK|NOT PRESENT)$)', 'CRITICAL'],
['^OK|NOT PRESENT$', 'OK'],
['^OK|NOT PRESENT$', 'OK']
],
sensors => [
['^(?!(OK)$)', 'CRITICAL'],
['^OK$', 'OK'],
],
['^OK$', 'OK']
]
};
$self->{components_path} = 'hardware::server::sun::mgmt_cards::components::showenvironment';
$self->{components_module} = ['temperature', 'si', 'disk', 'fan', 'voltage', 'psu', 'sensors'];
}
@ -75,7 +72,7 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_performance => 1, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
'hostname:s' => { name => 'hostname' },
'port:s' => { name => 'port', default => 23 },
@ -83,7 +80,7 @@ sub new {
'password:s' => { name => 'password' },
'timeout:s' => { name => 'timeout', default => 30 },
'command-plink:s' => { name => 'command_plink', default => 'plink' },
'ssh' => { name => 'ssh' },
'ssh' => { name => 'ssh' }
});
return $self;

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(sensor\..*|memory|disk|cpu)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(sensor\..*)$';
$self->{cb_hook2} = 'snmp_execute';
@ -37,12 +36,12 @@ sub set_system {
sensor => [
['ok', 'OK'],
['warning', 'WARNING'],
['critical', 'CRITICAL'],
['critical', 'CRITICAL']
],
default => [
['ok', 'OK'],
['critical', 'CRITICAL'],
],
['critical', 'CRITICAL']
]
};
$self->{components_path} = 'hardware::server::supermicro::superdoctor::snmp::mode::components';
@ -54,15 +53,14 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_load_components => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}
sub snmp_execute {
my ($self, %options) = @_;
$self->{snmp} = $options{snmp};
$self->{results} = $self->{snmp}->get_multiple_table(oids => $self->{request});
}

View File

@ -27,16 +27,14 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(alarm)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
alarm => [
['enabled', 'CRITICAL'],
['disabled', 'OK'],
],
['disabled', 'OK']
]
};
$self->{components_path} = 'hardware::telephony::avaya::mediagateway::snmp::mode::components';
@ -54,10 +52,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_performance => 1, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,18 +27,16 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(alarm)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
alarm => [
['on', 'CRITICAL'],
['off', 'OK'],
],
['off', 'OK']
]
};
$self->{components_path} = 'hardware::ups::alpha::snmp::mode::components';
$self->{components_module} = ['alarm'];
}
@ -47,7 +45,7 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_performance => 1, no_load_components => 1);
bless $self, $class;
$options{options}->add_options(arguments => {});
return $self;

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(sensor)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|humidity)$';
$self->{cb_hook2} = 'snmp_execute';
@ -41,8 +40,8 @@ sub set_system {
['sensorStatusNotApplicable', 'OK'],
['disconnected', 'OK'],
['connected', 'OK'],
],
['connected', 'OK']
]
};
$self->{components_path} = 'hardware::ups::apc::snmp::mode::components';
@ -54,8 +53,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_load_components => 1, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^psu|fan$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -37,8 +35,8 @@ sub set_system {
['active', 'OK'],
['deactive', 'CRITICAL'],
['not-install', 'OK'],
['unsupport', 'WARNING'],
],
['unsupport', 'WARNING']
]
};
$self->{components_path} = 'network::3com::snmp::mode::components';
@ -56,9 +54,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_performance => 1);
bless $self, $class;
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|fan|psu)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan)$';
$self->{cb_hook2} = 'snmp_execute';
@ -37,7 +36,7 @@ sub set_system {
psu => [
['off', 'CRITICAL'],
['on', 'OK'],
['unknown', 'UNKNOWN'],
['unknown', 'UNKNOWN']
],
fan => [
['failed', 'CRITICAL'],
@ -46,8 +45,8 @@ sub set_system {
['okMedMed', 'OK'],
['okMedHigh', 'OK'],
['notReady', 'WARNING'],
['unknown', 'UNKNOWN'],
],
['unknown', 'UNKNOWN']
]
};
$self->{components_path} = 'network::a10::ax::snmp::mode::components';
@ -58,9 +57,8 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_load_components => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(voltage|temperature|fan|psu)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(voltage|temperature|fan)$';
$self->{cb_hook2} = 'snmp_execute';
@ -42,8 +41,8 @@ sub set_system {
['shutdown', 'CRITICAL'],
['notPresent', 'OK'],
['notFunctioning', 'CRITICAL'],
['unknown', 'UNKNOWN'],
],
['unknown', 'UNKNOWN']
]
};
$self->{components_path} = 'network::acmepacket::snmp::mode::components';
@ -61,11 +60,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -29,15 +29,12 @@ use network::adva::fsp150::snmp::mode::components::resources qw($oids);
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} =
'^(?:shefl|card)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
operational => [
['normal', 'OK'],
['outage', 'CRITICAL'],
['outage', 'CRITICAL']
],
secondary => [
['fault', 'CRITICAL'],
@ -66,8 +63,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_performance => 1, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(cardtemperature|sfp)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(cardtemperature|sfp\.(temperature|voltage|current|txpower|rxpower))$';
$self->{cb_hook2} = 'snmp_execute';
@ -37,8 +36,8 @@ sub set_system {
sfp => [
['noLos', 'OK'],
['notAvailable', 'OK'],
['los', 'WARNING'],
],
['los', 'WARNING']
]
};
$self->{components_path} = 'network::alcatel::isam::snmp::mode::components';
@ -59,11 +58,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -25,10 +25,7 @@ use network::alcatel::omniswitch::snmp::mode::components::resources qw(%oids);
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} =
'^(?:backplane|chassis|container|fan|module|other|port|psu|sensor|stack|unknown)\.(?:oper|admin|status)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -90,10 +87,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(?:fan|voltage|temperature|psu)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(?:fan|voltage|temperature)$';
$self->{cb_hook2} = 'snmp_execute';
@ -37,16 +36,16 @@ sub set_system {
psu => [
['good', 'OK'],
['failed', 'CRITICAL'],
['notPowered', 'WARNING'],
['notPowered', 'WARNING']
],
fan => [
['good', 'OK'],
['failed', 'CRITICAL'],
['failed', 'CRITICAL']
],
default => [
['inRange', 'OK'],
['outOfRange', 'CRITICAL'],
],
['outOfRange', 'CRITICAL']
]
};
$self->{components_path} = 'network::allied::snmp::mode::components';
@ -65,8 +64,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -29,8 +29,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|alarm)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature)$';
$self->{cb_hook2} = 'snmp_execute';
@ -39,12 +38,12 @@ sub set_system {
temperature => [
['normal', 'OK'],
['warning', 'WARNING'],
['critical', 'CRITICAL'],
['critical', 'CRITICAL']
],
alarm => [
['normal', 'OK'],
['warning', 'WARNING'],
],
['warning', 'WARNING']
]
};
$self->{components_path} = 'network::atto::fibrebridge::snmp::mode::components';
@ -62,10 +61,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(module|fantray|psu)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -39,7 +37,7 @@ sub set_system {
['warning', 'WARNING'],
['minor', 'WARNING'],
['major', 'CRITICAL'],
['critical', 'CRITICAL'],
['critical', 'CRITICAL']
],
module => [
['moduleNotExist', 'OK'],
@ -48,8 +46,8 @@ sub set_system {
['moduleBackToServiceStart', 'WARNING'],
['moduleMismatch', 'WARNING'],
['moduleFaulty', 'CRITICAL'],
['notApplicable', 'OK'],
],
['notApplicable', 'OK']
]
};
$self->{components_path} = 'network::audiocodes::snmp::mode::components';
@ -67,11 +65,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_performance => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}
@ -113,4 +109,4 @@ Example: --threshold-overload='psu,CRITICAL,^(?!(cleared)$)'
=back
=cut
=cut

View File

@ -27,9 +27,8 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_numeric_check_section_option} = '^(fan|temperature|voltage)$';
$self->{regexp_threshold_overload_check_section_option} = '^(psu)$';
$self->{cb_hook2} = 'snmp_execute';
@ -37,8 +36,8 @@ sub set_system {
'psu' => [
['ok', 'OK'],
['critical', 'CRITICAL'],
['unknown', 'UNKNOWN'],
],
['unknown', 'UNKNOWN']
]
};
$self->{components_path} = 'network::barracuda::cloudgen::snmp::mode::components';
@ -56,10 +55,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(sensor|disk|sensor_opstatus)$';
$self->{regexp_threshold_numeric_check_section_option} = '^sensor$';
$self->{cb_hook2} = 'snmp_execute';
@ -38,7 +37,7 @@ sub set_system {
['ok', 'OK'],
['unavailable', 'UNKNOWN'],
['nonoperational', 'UNKNOWN'],
['unknown', 'UNKNOWN'],
['unknown', 'UNKNOWN']
],
sensor => [
['ok', 'OK'],
@ -55,7 +54,7 @@ sub set_system {
['temperatureHighSevere', 'CRITICAL'],
['fanSlowWarning', 'WARNING'],
['fanSlowCritical', 'CRITICAL'],
['fanStopped', 'CRITICAL'],
['fanStopped', 'CRITICAL']
],
disk => [
['present', 'OK'],
@ -67,8 +66,8 @@ sub set_system {
['empty', 'WARNING'],
['ioerror', 'CRITICAL'],
['unusable', 'CRITICAL'],
['unknown', 'UNKNOWN'],
],
['unknown', 'UNKNOWN']
]
};
$self->{components_path} = 'network::bluecoat::snmp::mode::components';
@ -86,11 +85,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(switch|sensor)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan)$';
$self->{cb_hook2} = 'snmp_execute';
@ -40,15 +39,15 @@ sub set_system {
['below-min', 'WARNING'],
['nominal', 'OK'],
['above-max', 'CRITICAL'],
['absent', 'OK'],
['absent', 'OK']
],
switch => [
['online', 'OK'],
['offline', 'WARNING'],
['testing', 'WARNING'],
['faulty', 'CRITICAL'],
['absent', 'OK'],
],
['absent', 'OK']
]
};
$self->{components_path} = 'network::brocade::snmp::mode::components';
@ -59,16 +58,15 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_load_components => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}
sub snmp_execute {
my ($self, %options) = @_;
$self->{snmp} = $options{snmp};
$self->{results} = $self->{snmp}->get_multiple_table(oids => $self->{request});
}

View File

@ -27,9 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|voltage|fan|psu|raiddisk)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -89,10 +87,8 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_performance => 1, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(psu)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fanspeed|voltage)$';
$self->{cb_hook2} = 'snmp_execute';
@ -38,8 +37,8 @@ sub set_system {
['normal', 'OK'],
['not present', 'OK'],
['failed', 'CRITICAL'],
['not supported', 'UNKNOWN'],
],
['not supported', 'UNKNOWN']
]
};
$self->{components_path} = 'network::citrix::netscaler::snmp::mode::components';
@ -69,11 +68,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -25,15 +25,13 @@ use base qw(centreon::plugins::templates::hardware);
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(hardware|software)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
default => [
['OK', 'OK'],
['ERROR', 'CRITICAL'],
],
['ERROR', 'CRITICAL']
]
};
$self->{components_path} = 'network::citrix::sdx::snmp::mode::components';
@ -44,10 +42,8 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_performance => 1, no_load_components => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(service)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -40,8 +38,8 @@ sub set_system {
['running', 'OK'],
['exiting', 'CRITICAL'],
['dead', 'CRITICAL'],
['unregistered', 'OK'],
],
['unregistered', 'OK']
]
};
$self->{components_path} = 'network::cyberoam::snmp::mode::components';
@ -60,8 +58,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_performance => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,9 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} =
'^(?:card|temperature|fan|fantray|psu)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(?:temperature)$';
$self->{cb_hook2} = 'snmp_execute';
@ -73,8 +71,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(fan|psu)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -39,7 +37,7 @@ sub set_system {
['critical', 'CRITICAL'],
['notFunctioning', 'CRITICAL'],
['notPresent', 'OK'],
['normal', 'OK'],
['normal', 'OK']
],
fan => [
['shutdown', 'WARNING'],
@ -47,8 +45,8 @@ sub set_system {
['critical', 'CRITICAL'],
['notFunctioning', 'CRITICAL'],
['notPresent', 'OK'],
['normal', 'OK'],
],
['normal', 'OK']
]
};
$self->{components_path} = 'network::dlink::dgs3100::snmp::mode::components';
@ -66,10 +64,8 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_performance => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}
@ -112,4 +108,4 @@ Example: --threshold-overload='psu,CRITICAL,^(?!(normal)$)'
=back
=cut
=cut

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(fan|psu)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(fan|temperature)$';
$self->{cb_hook2} = 'snmp_execute';
@ -41,7 +40,7 @@ sub set_system {
['lowVoltage', 'WARNING'],
['overCurrent', 'CRITICAL'],
['fail', 'CRITICAL'],
['disconnect', 'WARNING'],
['disconnect', 'WARNING']
],
fan => [
['working', 'OK'],
@ -50,8 +49,8 @@ sub set_system {
['speed-0', 'WARNING'],
['speed-low', 'WARNING'],
['speed-middle', 'OK'],
['speed-high', 'WARNING'],
],
['speed-high', 'WARNING']
]
};
$self->{components_path} = 'network::dlink::standard::snmp::mode::components';
@ -69,10 +68,8 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}
@ -120,4 +117,4 @@ Example: --critical='temperature,.*,40'
=back
=cut
=cut

View File

@ -24,9 +24,7 @@ use base qw(centreon::plugins::templates::hardware);
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(psu|frameline)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -50,10 +48,8 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_performance => 1, no_load_components => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(fan|psu|slot|poe)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan|poe|psu\.power|psu\.fan)$';
$self->{cb_hook2} = 'snmp_execute';
@ -91,8 +90,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|fan|psu)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan)$';
$self->{cb_hook2} = 'snmp_execute';
@ -37,13 +36,13 @@ sub set_system {
fan => [
['bad', 'CRITICAL'],
['good', 'OK'],
['notPresent', 'OK'],
['notPresent', 'OK']
],
psu => [
['bad', 'CRITICAL'],
['good', 'OK'],
['notPresent', 'OK'],
],
['notPresent', 'OK']
]
};
$self->{components_path} = 'network::f5::bigip::snmp::mode::components';
@ -61,10 +60,8 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(fan|psu|led)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature)$';
$self->{cb_hook2} = 'snmp_execute';
@ -68,9 +67,8 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(sensor|fan|psu)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -77,10 +75,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_performance => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {
});
return $self;
}

View File

@ -27,9 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(domain|enclosure|module|port|moduleport|physicalserver|enet|fc|profile)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -69,10 +67,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_performance => 1, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {
});
return $self;
}
@ -110,4 +107,4 @@ Example: --threshold-overload='module,CRITICAL,^(?!(normal)$)'
=back
=cut
=cut

View File

@ -29,7 +29,6 @@ use centreon::plugins::statefile;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(fan|temperature)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(fan|temperature)$';
$self->{cb_hook1} = 'init_cache';
@ -38,8 +37,8 @@ sub set_system {
$self->{thresholds} = {
fan => [
['abnormal', 'CRITICAL'],
['normal', 'OK'],
],
['normal', 'OK']
]
};
$self->{components_path} = 'network::huawei::snmp::mode::components';
@ -64,10 +63,10 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
'reload-cache-time:s' => { name => 'reload_cache_time', default => 180 },
'short-name' => { name => 'short_name' },
'reload-cache-time:s' => { name => 'reload_cache_time', default => 180 },
'short-name' => { name => 'short_name' }
});
$self->{statefile_cache} = centreon::plugins::statefile->new(%options);

View File

@ -27,9 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(service)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -38,8 +36,8 @@ sub set_system {
['working', 'OK'],
['inactive', 'OK'],
['warning', 'WARNING'],
['failed', 'CRITICAL'],
],
['failed', 'CRITICAL']
]
};
$self->{components_path} = 'network::infoblox::snmp::mode::components';
@ -50,7 +48,7 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_load_components => 1);
bless $self, $class;
$options{options}->add_options(arguments => {});
return $self;

View File

@ -28,8 +28,7 @@ use centreon::plugins::statefile;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(fru|operating|alarm)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(operating-temperature|operating-cpu|operating-buffer|operating-heap)$';
$self->{cb_hook1} = 'init_cache';
@ -81,9 +80,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments => {
'reload-cache-time:s' => { name => 'reload_cache_time', default => 180 },
'reload-cache-time:s' => { name => 'reload_cache_time', default => 180 }
});
$self->{statefile_cache} = centreon::plugins::statefile->new(%options);

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(psu|module|fan)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature)$';
$self->{cb_hook2} = 'snmp_execute';
@ -63,10 +62,8 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(?:faultled)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(?:temperature)$';
$self->{cb_hook2} = 'snmp_execute';
@ -54,9 +53,8 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(cpu|fan|psu)$';
$self->{cb_hook2} = 'snmp_execute';
@ -65,10 +63,8 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}
@ -111,4 +107,4 @@ Example: --threshold-overload='fan,CRITICAL,^(?!(notActive)$)'
=back
=cut
=cut

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|fan|psu)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan)$';
$self->{cb_hook2} = 'snmp_execute';
@ -69,11 +68,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,12 +27,11 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(entity)$';
$self->{regexp_threshold_numeric_check_section_option} = '^temperature$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
default => [
['unknown', 'UNKNOWN'],
@ -48,8 +47,8 @@ sub set_system {
['downgrade', 'OK'],
['resetPending', 'OK'],
['softReset', 'OK'],
['preExtension', 'OK'],
],
['preExtension', 'OK']
]
};
$self->{components_path} = 'network::nokia::timos::snmp::mode::components';
@ -67,11 +66,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_load_components => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(fan|psu|card|entity)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan.temperature)$';
$self->{cb_hook2} = 'snmp_execute';
@ -83,11 +82,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}
@ -134,4 +131,4 @@ Example: --critical='temperature,.*,40'
=back
=cut
=cut

View File

@ -28,8 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} =
'^(?:psu|temperature|voltage)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(?:temperature|voltage)$';
$self->{cb_hook2} = 'ssh_execute';
@ -61,8 +59,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,8 +27,7 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|psu)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature)$';
$self->{cb_hook2} = 'snmp_execute';
@ -58,9 +57,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {});
return $self;
}

View File

@ -27,17 +27,15 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(fan|psu|board)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
default => [
['disabled', 'OK'],
['ok', 'OK'],
['failed', 'CRITICAL'],
],
['failed', 'CRITICAL']
]
};
$self->{components_path} = 'network::polycom::rmx::snmp::mode::components';
@ -48,7 +46,7 @@ my %map_status = (1 => 'disabled', 2 => 'ok', 3 => 'failed');
my $mapping = {
hardwareFanStatus => { oid => '.1.3.6.1.4.1.13885.110.1.3.2.1', map => \%map_status },
hardwarePowerSupplyStatus => { oid => '.1.3.6.1.4.1.13885.110.1.3.3.1', map => \%map_status },
hardwareIntegratedBoardStatus => { oid => '.1.3.6.1.4.1.13885.110.1.3.4.1', map => \%map_status },
hardwareIntegratedBoardStatus => { oid => '.1.3.6.1.4.1.13885.110.1.3.4.1', map => \%map_status }
};
sub snmp_execute {
@ -64,11 +62,9 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_performance => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}
@ -104,4 +100,4 @@ Example: --threshold-overload='psu,CRITICAL,disabled'
=back
=cut
=cut

View File

@ -25,8 +25,6 @@ use base qw(centreon::plugins::templates::hardware);
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(cpu|temperature|psu|fan)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
@ -60,10 +58,8 @@ sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_absent => 1, no_performance => 1, no_load_components => 1);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}
@ -276,4 +272,4 @@ sub check {
}
1;

View File

@ -28,7 +28,6 @@ use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_overload_check_section_option} = '^(temperature|fan|voltage)$';
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan.speed|voltage)$';
$self->{cb_hook2} = 'snmp_execute';
@ -36,8 +35,8 @@ sub set_system {
$self->{thresholds} = {
fan => [
['abnormal', 'CRITICAL'],
['normal', 'OK'],
],
['normal', 'OK']
]
};
$self->{components_path} = 'network::raisecom::snmp::mode::components';
@ -56,9 +55,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
});
$options{options}->add_options(arguments => {});
return $self;
}

Some files were not shown because too many files have changed in this diff Show More