(plugin) network::dell::nseries::snmp - metric v2 + renamed dell::n4000 (#3696)
This commit is contained in:
parent
4dcf614977
commit
7cb1c85f4e
|
@ -30,18 +30,18 @@ my %map_fan_status = (
|
||||||
4 => 'powering',
|
4 => 'powering',
|
||||||
5 => 'nopower',
|
5 => 'nopower',
|
||||||
6 => 'notpowering',
|
6 => 'notpowering',
|
||||||
7 => 'incompatible',
|
7 => 'incompatible'
|
||||||
);
|
);
|
||||||
|
|
||||||
my $mapping = {
|
my $mapping = {
|
||||||
boxServicesFanItemState => { oid => '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.6.1.3', map => \%map_fan_status },
|
boxServicesFanItemState => { oid => '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.6.1.3', map => \%map_fan_status },
|
||||||
boxServicesFanSpeed => { oid => '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.6.1.4' },
|
boxServicesFanSpeed => { oid => '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.6.1.4' }
|
||||||
};
|
};
|
||||||
my $oid_boxServicesFansEntry = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.6.1';
|
my $oid_boxServicesFansEntry = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.6.1';
|
||||||
|
|
||||||
sub load {
|
sub load {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
push @{$self->{request}}, { oid => $oid_boxServicesFansEntry, start => $mapping->{boxServicesFanItemState}->{oid} };
|
push @{$self->{request}}, { oid => $oid_boxServicesFansEntry, start => $mapping->{boxServicesFanItemState}->{oid} };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,31 +57,39 @@ sub check {
|
||||||
next if ($oid !~ /^$mapping->{boxServicesFanItemState}->{oid}\.(.*)$/);
|
next if ($oid !~ /^$mapping->{boxServicesFanItemState}->{oid}\.(.*)$/);
|
||||||
my $instance = $1;
|
my $instance = $1;
|
||||||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_boxServicesFansEntry}, instance => $instance);
|
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_boxServicesFansEntry}, instance => $instance);
|
||||||
|
|
||||||
next if ($self->check_filter(section => 'fan', instance => $instance));
|
next if ($self->check_filter(section => 'fan', instance => $instance));
|
||||||
if ($result->{boxServicesFanItemState} =~ /notPresent/i) {
|
if ($result->{boxServicesFanItemState} =~ /notPresent/i) {
|
||||||
$self->absent_problem(section => 'fan', instance => $instance);
|
$self->absent_problem(section => 'fan', instance => $instance);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{components}->{fan}->{total}++;
|
$self->{components}->{fan}->{total}++;
|
||||||
$self->{output}->output_add(long_msg => sprintf("fan '%s' status is '%s' [instance = %s, speed = %s]",
|
$self->{output}->output_add(
|
||||||
$instance, $result->{boxServicesFanItemState}, $instance, defined($result->{boxServicesFanSpeed}) ? $result->{boxServicesFanSpeed} : 'unknown'));
|
long_msg => sprintf(
|
||||||
|
"fan '%s' status is '%s' [instance = %s, speed = %s]",
|
||||||
|
$instance, $result->{boxServicesFanItemState}, $instance, defined($result->{boxServicesFanSpeed}) ? $result->{boxServicesFanSpeed} : 'unknown'
|
||||||
|
)
|
||||||
|
);
|
||||||
$exit = $self->get_severity(label => 'default', section => 'fan', value => $result->{boxServicesFanItemState});
|
$exit = $self->get_severity(label => 'default', section => 'fan', value => $result->{boxServicesFanItemState});
|
||||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Fan '%s' status is '%s'", $instance, $result->{boxServicesFanItemState}));
|
severity => $exit,
|
||||||
|
short_msg => sprintf("Fan '%s' status is '%s'", $instance, $result->{boxServicesFanItemState})
|
||||||
|
);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'fan', instance => $instance, value => $result->{boxServicesFanSpeed});
|
($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'fan', instance => $instance, value => $result->{boxServicesFanSpeed});
|
||||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Fan '%s' is '%s' rpm", $instance, $result->{boxServicesFanSpeed}));
|
severity => $exit,
|
||||||
|
short_msg => sprintf("Fan '%s' is '%s' rpm", $instance, $result->{boxServicesFanSpeed})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$self->{output}->perfdata_add(
|
$self->{output}->perfdata_add(
|
||||||
label => 'fan', unit => 'rpm',
|
|
||||||
nlabel => 'hardware.fan.speed.rpm',
|
nlabel => 'hardware.fan.speed.rpm',
|
||||||
|
unit => 'rpm',
|
||||||
instances => $instance,
|
instances => $instance,
|
||||||
value => $result->{boxServicesFanSpeed},
|
value => $result->{boxServicesFanSpeed},
|
||||||
warning => $warn,
|
warning => $warn,
|
||||||
|
|
|
@ -30,11 +30,11 @@ my %map_status = (
|
||||||
4 => 'powering',
|
4 => 'powering',
|
||||||
5 => 'nopower',
|
5 => 'nopower',
|
||||||
6 => 'notpowering',
|
6 => 'notpowering',
|
||||||
7 => 'incompatible',
|
7 => 'incompatible'
|
||||||
);
|
);
|
||||||
|
|
||||||
my $mapping = {
|
my $mapping = {
|
||||||
boxServicesPowSupplyItemState => { oid => '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.7.1.3', map => \%map_status },
|
boxServicesPowSupplyItemState => { oid => '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.7.1.3', map => \%map_status }
|
||||||
};
|
};
|
||||||
my $oid_boxServicesPowSuppliesEntry = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.7.1';
|
my $oid_boxServicesPowSuppliesEntry = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.7.1';
|
||||||
|
|
||||||
|
@ -62,15 +62,20 @@ sub check {
|
||||||
$self->absent_problem(section => 'psu', instance => $instance);
|
$self->absent_problem(section => 'psu', instance => $instance);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{components}->{psu}->{total}++;
|
$self->{components}->{psu}->{total}++;
|
||||||
$self->{output}->output_add(long_msg => sprintf("power supply '%s' status is '%s' [instance = %s]",
|
$self->{output}->output_add(
|
||||||
$instance, $result->{boxServicesPowSupplyItemState}, $instance));
|
long_msg => sprintf(
|
||||||
|
"power supply '%s' status is '%s' [instance = %s]",
|
||||||
|
$instance, $result->{boxServicesPowSupplyItemState}, $instance
|
||||||
|
)
|
||||||
|
);
|
||||||
$exit = $self->get_severity(label => 'default', section => 'psu', value => $result->{boxServicesPowSupplyItemState});
|
$exit = $self->get_severity(label => 'default', section => 'psu', value => $result->{boxServicesPowSupplyItemState});
|
||||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Power supply '%s' status is '%s'", $instance, $result->{boxServicesPowSupplyItemState}));
|
severity => $exit,
|
||||||
next;
|
short_msg => sprintf("Power supply '%s' status is '%s'", $instance, $result->{boxServicesPowSupplyItemState})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,16 +30,16 @@ my %map_temp_status = (
|
||||||
3 => 'critical',
|
3 => 'critical',
|
||||||
4 => 'shutdown',
|
4 => 'shutdown',
|
||||||
5 => 'notpresent',
|
5 => 'notpresent',
|
||||||
6 => 'notoperational',
|
6 => 'notoperational'
|
||||||
);
|
);
|
||||||
|
|
||||||
my $mapping1 = {
|
my $mapping1 = {
|
||||||
boxServicesTempSensorState => { oid => '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.8.1.3', map => \%map_temp_status },
|
boxServicesTempSensorState => { oid => '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.8.1.3', map => \%map_temp_status },
|
||||||
boxServicesTempSensorTemperature => { oid => '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.8.1.4' },
|
boxServicesTempSensorTemperature => { oid => '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.8.1.4' }
|
||||||
};
|
};
|
||||||
my $mapping2 = {
|
my $mapping2 = {
|
||||||
boxServicesTempSensorState => { oid => '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.8.1.4', map => \%map_temp_status },
|
boxServicesTempSensorState => { oid => '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.8.1.4', map => \%map_temp_status },
|
||||||
boxServicesTempSensorTemperature => { oid => '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.8.1.5' },
|
boxServicesTempSensorTemperature => { oid => '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.8.1.5' }
|
||||||
};
|
};
|
||||||
my $oid_boxServicesTempSensorsEntry = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.8.1';
|
my $oid_boxServicesTempSensorsEntry = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.8.1';
|
||||||
|
|
||||||
|
@ -60,36 +60,45 @@ sub check {
|
||||||
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_boxServicesTempSensorsEntry}})) {
|
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_boxServicesTempSensorsEntry}})) {
|
||||||
next if ($oid !~ /^$mapping2->{boxServicesTempSensorState}->{oid}\.(.*)$/);
|
next if ($oid !~ /^$mapping2->{boxServicesTempSensorState}->{oid}\.(.*)$/);
|
||||||
my $instance = $1;
|
my $instance = $1;
|
||||||
|
|
||||||
if (defined($self->{results}->{$oid_boxServicesTempSensorsEntry}->{$mapping2->{boxServicesTempSensorTemperature}->{oid} . '.' . $instance})) {
|
if (defined($self->{results}->{$oid_boxServicesTempSensorsEntry}->{$mapping2->{boxServicesTempSensorTemperature}->{oid} . '.' . $instance})) {
|
||||||
$result = $self->{snmp}->map_instance(mapping => $mapping2, results => $self->{results}->{$oid_boxServicesTempSensorsEntry}, instance => $instance);
|
$result = $self->{snmp}->map_instance(mapping => $mapping2, results => $self->{results}->{$oid_boxServicesTempSensorsEntry}, instance => $instance);
|
||||||
} else {
|
} else {
|
||||||
$result = $self->{snmp}->map_instance(mapping => $mapping1, results => $self->{results}->{$oid_boxServicesTempSensorsEntry}, instance => $instance);
|
$result = $self->{snmp}->map_instance(mapping => $mapping1, results => $self->{results}->{$oid_boxServicesTempSensorsEntry}, instance => $instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
next if ($self->check_filter(section => 'temperature', instance => $instance));
|
next if ($self->check_filter(section => 'temperature', instance => $instance));
|
||||||
if ($result->{boxServicesTempSensorState} =~ /notPresent/i) {
|
if ($result->{boxServicesTempSensorState} =~ /notPresent/i) {
|
||||||
$self->absent_problem(section => 'temperature', instance => $instance);
|
$self->absent_problem(section => 'temperature', instance => $instance);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{components}->{temperature}->{total}++;
|
$self->{components}->{temperature}->{total}++;
|
||||||
$self->{output}->output_add(long_msg => sprintf("temperature '%s' status is '%s' [instance = %s, temperature = %s]",
|
$self->{output}->output_add(
|
||||||
$instance, $result->{boxServicesTempSensorState}, $instance, defined($result->{boxServicesTempSensorTemperature}) ? $result->{boxServicesTempSensorTemperature} : 'unknown'));
|
long_msg => sprintf(
|
||||||
|
"temperature '%s' status is '%s' [instance = %s, temperature = %s]",
|
||||||
|
$instance, $result->{boxServicesTempSensorState}, $instance, defined($result->{boxServicesTempSensorTemperature}) ? $result->{boxServicesTempSensorTemperature} : 'unknown'
|
||||||
|
)
|
||||||
|
);
|
||||||
$exit = $self->get_severity(section => 'temperature', value => $result->{boxServicesTempSensorState});
|
$exit = $self->get_severity(section => 'temperature', value => $result->{boxServicesTempSensorState});
|
||||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Temperature '%s' status is '%s'", $instance, $result->{boxServicesTempSensorState}));
|
severity => $exit,
|
||||||
|
short_msg => sprintf("Temperature '%s' status is '%s'", $instance, $result->{boxServicesTempSensorState})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'temperature', instance => $instance, value => $result->{boxServicesTempSensorTemperature});
|
($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'temperature', instance => $instance, value => $result->{boxServicesTempSensorTemperature});
|
||||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Temperature '%s' is '%s' C", $instance, $result->{boxServicesTempSensorTemperature}));
|
severity => $exit,
|
||||||
|
short_msg => sprintf("Temperature '%s' is '%s' C", $instance, $result->{boxServicesTempSensorTemperature})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{output}->perfdata_add(
|
$self->{output}->perfdata_add(
|
||||||
label => 'temp', unit => 'C',
|
|
||||||
nlabel => 'hardware.temperature.celsius',
|
nlabel => 'hardware.temperature.celsius',
|
||||||
|
unit => 'C',
|
||||||
instances => $instance,
|
instances => $instance,
|
||||||
value => $result->{boxServicesTempSensorTemperature},
|
value => $result->{boxServicesTempSensorTemperature},
|
||||||
warning => $warn,
|
warning => $warn,
|
||||||
|
|
|
@ -27,12 +27,12 @@ use warnings;
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ($class, %options) = @_;
|
my ($class, %options) = @_;
|
||||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$options{options}->add_options(arguments => {
|
$options{options}->add_options(arguments => {
|
||||||
'warning:s' => { name => 'warning', default => '' },
|
'warning:s' => { name => 'warning', default => '' },
|
||||||
'critical:s' => { name => 'critical', default => '' },
|
'critical:s' => { name => 'critical', default => '' }
|
||||||
});
|
});
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
|
@ -77,8 +77,10 @@ sub run {
|
||||||
|
|
||||||
my $oid_agentSwitchCpuProcessTotalUtilization1 = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.9.0';
|
my $oid_agentSwitchCpuProcessTotalUtilization1 = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.9.0';
|
||||||
my $oid_agentSwitchCpuProcessTotalUtilization2 = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.4.0'; # oid for 6200 series
|
my $oid_agentSwitchCpuProcessTotalUtilization2 = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.4.0'; # oid for 6200 series
|
||||||
$self->{result} = $self->{snmp}->get_leef(oids => [ $oid_agentSwitchCpuProcessTotalUtilization1, $oid_agentSwitchCpuProcessTotalUtilization2 ],
|
$self->{result} = $self->{snmp}->get_leef(
|
||||||
nothing_quit => 1);
|
oids => [ $oid_agentSwitchCpuProcessTotalUtilization1, $oid_agentSwitchCpuProcessTotalUtilization2 ],
|
||||||
|
nothing_quit => 1
|
||||||
|
);
|
||||||
|
|
||||||
my $cpu_usage;
|
my $cpu_usage;
|
||||||
if ((defined($self->{result}->{$oid_agentSwitchCpuProcessTotalUtilization1})) && ($self->{result}->{$oid_agentSwitchCpuProcessTotalUtilization1} =~ /sec.*(sec|min).*(sec|min)/i)) {
|
if ((defined($self->{result}->{$oid_agentSwitchCpuProcessTotalUtilization1})) && ($self->{result}->{$oid_agentSwitchCpuProcessTotalUtilization1} =~ /sec.*(sec|min).*(sec|min)/i)) {
|
||||||
|
@ -86,8 +88,10 @@ sub run {
|
||||||
} elsif ((defined($self->{result}->{$oid_agentSwitchCpuProcessTotalUtilization2})) && ($self->{result}->{$oid_agentSwitchCpuProcessTotalUtilization2} =~ /sec.*(sec|min).*(sec|min)/i)) {
|
} elsif ((defined($self->{result}->{$oid_agentSwitchCpuProcessTotalUtilization2})) && ($self->{result}->{$oid_agentSwitchCpuProcessTotalUtilization2} =~ /sec.*(sec|min).*(sec|min)/i)) {
|
||||||
$cpu_usage = $self->{result}->{$oid_agentSwitchCpuProcessTotalUtilization2};
|
$cpu_usage = $self->{result}->{$oid_agentSwitchCpuProcessTotalUtilization2};
|
||||||
} else {
|
} else {
|
||||||
$self->{output}->output_add(severity => 'UNKNOWN',
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Can't get CPU information."));
|
severity => 'UNKNOWN',
|
||||||
|
short_msg => sprintf("Can't get CPU information.")
|
||||||
|
);
|
||||||
$self->{output}->display();
|
$self->{output}->display();
|
||||||
$self->{output}->exit();
|
$self->{output}->exit();
|
||||||
}
|
}
|
||||||
|
@ -96,33 +100,52 @@ sub run {
|
||||||
my $cpu1min = $2;
|
my $cpu1min = $2;
|
||||||
my $cpu5min = $3;
|
my $cpu5min = $3;
|
||||||
|
|
||||||
my $exit1 = $self->{perfdata}->threshold_check(value => $cpu5sec,
|
my $exit1 = $self->{perfdata}->threshold_check(
|
||||||
threshold => [ { label => 'crit5s', 'exit_litteral' => 'critical' }, { label => 'warn5s', exit_litteral => 'warning' } ]);
|
value => $cpu5sec,
|
||||||
my $exit2 = $self->{perfdata}->threshold_check(value => $cpu1min,
|
threshold => [ { label => 'crit5s', 'exit_litteral' => 'critical' }, { label => 'warn5s', exit_litteral => 'warning' } ]
|
||||||
threshold => [ { label => 'crit1m', 'exit_litteral' => 'critical' }, { label => 'warn1m', exit_litteral => 'warning' } ]);
|
);
|
||||||
my $exit3 = $self->{perfdata}->threshold_check(value => $cpu5min,
|
my $exit2 = $self->{perfdata}->threshold_check(
|
||||||
threshold => [ { label => 'crit5m', 'exit_litteral' => 'critical' }, { label => 'warn5m', exit_litteral => 'warning' } ]);
|
value => $cpu1min,
|
||||||
|
threshold => [ { label => 'crit1m', 'exit_litteral' => 'critical' }, { label => 'warn1m', exit_litteral => 'warning' } ]
|
||||||
|
);
|
||||||
|
my $exit3 = $self->{perfdata}->threshold_check(
|
||||||
|
value => $cpu5min,
|
||||||
|
threshold => [ { label => 'crit5m', 'exit_litteral' => 'critical' }, { label => 'warn5m', exit_litteral => 'warning' } ]
|
||||||
|
);
|
||||||
my $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2, $exit3 ]);
|
my $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2, $exit3 ]);
|
||||||
|
|
||||||
$self->{output}->output_add(severity => $exit,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("CPU Usage: %.2f%% (5sec), %.2f%% (1min), %.2f%% (5min)",
|
severity => $exit,
|
||||||
$cpu5sec, $cpu1min, $cpu5min));
|
short_msg => sprintf(
|
||||||
|
"CPU Usage: %.2f%% (5sec), %.2f%% (1min), %.2f%% (5min)",
|
||||||
|
$cpu5sec, $cpu1min, $cpu5min
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$self->{output}->perfdata_add(label => "cpu_5s", unit => '%',
|
$self->{output}->perfdata_add(
|
||||||
value => $cpu5sec,
|
nlabel => 'cpu.utilization.5s.percentage',
|
||||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn5s'),
|
unit => '%',
|
||||||
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit5s'),
|
value => $cpu5sec,
|
||||||
min => 0, max => 100);
|
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn5s'),
|
||||||
$self->{output}->perfdata_add(label => "cpu_1m", unit => '%',
|
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit5s'),
|
||||||
value => $cpu1min,
|
min => 0, max => 100
|
||||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1m'),
|
);
|
||||||
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1m'),
|
$self->{output}->perfdata_add(
|
||||||
min => 0, max => 100);
|
nlabel => 'cpu.utilization.1m.percentage',
|
||||||
$self->{output}->perfdata_add(label => "cpu_5m", unit => '%',
|
unit => '%',
|
||||||
value => $cpu5min,
|
value => $cpu1min,
|
||||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn5m'),
|
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1m'),
|
||||||
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit5m'),
|
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1m'),
|
||||||
min => 0, max => 100);
|
min => 0, max => 100
|
||||||
|
);
|
||||||
|
$self->{output}->perfdata_add(
|
||||||
|
nlabel => 'cpu.utilization.5m.percentage',
|
||||||
|
unit => '%',
|
||||||
|
value => $cpu5min,
|
||||||
|
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn5m'),
|
||||||
|
critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit5m'),
|
||||||
|
min => 0, max => 100
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$self->{output}->output_add(severity => 'UNKNOWN',
|
$self->{output}->output_add(severity => 'UNKNOWN',
|
||||||
short_msg => sprintf("Can't parse CPU usage."));
|
short_msg => sprintf("Can't parse CPU usage."));
|
||||||
|
|
|
@ -40,7 +40,7 @@ sub set_system {
|
||||||
['powering', 'WARNING'],
|
['powering', 'WARNING'],
|
||||||
['nopower', 'CRITICAL'],
|
['nopower', 'CRITICAL'],
|
||||||
['notpowering', 'CRITICAL'],
|
['notpowering', 'CRITICAL'],
|
||||||
['incompatible', 'CRITICAL'],
|
['incompatible', 'CRITICAL']
|
||||||
],
|
],
|
||||||
temperature => [
|
temperature => [
|
||||||
['low', 'WARNING'],
|
['low', 'WARNING'],
|
||||||
|
@ -49,8 +49,8 @@ sub set_system {
|
||||||
['critical', 'CRITICAL'],
|
['critical', 'CRITICAL'],
|
||||||
['shutdown', 'CRITICAL'],
|
['shutdown', 'CRITICAL'],
|
||||||
['notpresent', 'OK'],
|
['notpresent', 'OK'],
|
||||||
['notoperational', 'CRITICAL'],
|
['notoperational', 'CRITICAL']
|
||||||
],
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
$self->{components_path} = 'centreon::common::dell::fastpath::snmp::mode::components';
|
$self->{components_path} = 'centreon::common::dell::fastpath::snmp::mode::components';
|
||||||
|
@ -66,7 +66,7 @@ sub snmp_execute {
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ($class, %options) = @_;
|
my ($class, %options) = @_;
|
||||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$options{options}->add_options(arguments => {});
|
$options{options}->add_options(arguments => {});
|
||||||
|
|
|
@ -27,12 +27,12 @@ use warnings;
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ($class, %options) = @_;
|
my ($class, %options) = @_;
|
||||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$options{options}->add_options(arguments => {
|
$options{options}->add_options(arguments => {
|
||||||
'warning:s' => { name => 'warning' },
|
'warning:s' => { name => 'warning' },
|
||||||
'critical:s' => { name => 'critical' },
|
'critical:s' => { name => 'critical' }
|
||||||
});
|
});
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
|
@ -59,9 +59,10 @@ sub run {
|
||||||
my $oid_agentSwitchCpuProcessMemFree = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.1.0'; # in KB
|
my $oid_agentSwitchCpuProcessMemFree = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.1.0'; # in KB
|
||||||
my $oid_agentSwitchCpuProcessMemAvailable = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.2.0'; # in KB
|
my $oid_agentSwitchCpuProcessMemAvailable = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.2.0'; # in KB
|
||||||
|
|
||||||
my $result = $self->{snmp}->get_leef(oids => [$oid_agentSwitchCpuProcessMemFree,
|
my $result = $self->{snmp}->get_leef(
|
||||||
$oid_agentSwitchCpuProcessMemAvailable],
|
oids => [$oid_agentSwitchCpuProcessMemFree, $oid_agentSwitchCpuProcessMemAvailable],
|
||||||
nothing_quit => 1);
|
nothing_quit => 1
|
||||||
|
);
|
||||||
|
|
||||||
my $memory_free = $result->{$oid_agentSwitchCpuProcessMemFree} * 1024;
|
my $memory_free = $result->{$oid_agentSwitchCpuProcessMemFree} * 1024;
|
||||||
my $memory_available = $result->{$oid_agentSwitchCpuProcessMemAvailable} * 1024;
|
my $memory_available = $result->{$oid_agentSwitchCpuProcessMemAvailable} * 1024;
|
||||||
|
@ -75,17 +76,24 @@ sub run {
|
||||||
my ($memory_available_value, $memory_available_unit) = $self->{perfdata}->change_bytes(value => $memory_available);
|
my ($memory_available_value, $memory_available_unit) = $self->{perfdata}->change_bytes(value => $memory_available);
|
||||||
my ($memory_free_value, $memory_free_unit) = $self->{perfdata}->change_bytes(value => $memory_free);
|
my ($memory_free_value, $memory_free_unit) = $self->{perfdata}->change_bytes(value => $memory_free);
|
||||||
|
|
||||||
$self->{output}->output_add(severity => $exit,
|
$self->{output}->output_add(
|
||||||
short_msg => sprintf("Memory used: %s (%.2f%%), Size: %s, Free: %s (%.2f%%)",
|
severity => $exit,
|
||||||
$memory_used_value . " " . $memory_used_unit, $prct_used,
|
short_msg => sprintf(
|
||||||
$memory_available_value . " " . $memory_available_unit,
|
"Memory used: %s (%.2f%%), Size: %s, Free: %s (%.2f%%)",
|
||||||
$memory_free_value . " " . $memory_free_unit, $prct_free));
|
$memory_used_value . " " . $memory_used_unit, $prct_used,
|
||||||
|
$memory_available_value . " " . $memory_available_unit,
|
||||||
$self->{output}->perfdata_add(label => "used", unit => 'B',
|
$memory_free_value . " " . $memory_free_unit, $prct_free
|
||||||
value => $memory_used,
|
)
|
||||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $memory_available, cast_int => 1),
|
);
|
||||||
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $memory_available, cast_int => 1),
|
|
||||||
min => 0, max => $memory_available);
|
$self->{output}->perfdata_add(
|
||||||
|
nlabel => 'memory.usage.bytes',
|
||||||
|
unit => 'B',
|
||||||
|
value => $memory_used,
|
||||||
|
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $memory_available, cast_int => 1),
|
||||||
|
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $memory_available, cast_int => 1),
|
||||||
|
min => 0, max => $memory_available
|
||||||
|
);
|
||||||
|
|
||||||
$self->{output}->display();
|
$self->{output}->display();
|
||||||
$self->{output}->exit();
|
$self->{output}->exit();
|
||||||
|
@ -113,4 +121,3 @@ Threshold critical in percent.
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,182 @@
|
||||||
|
#
|
||||||
|
# Copyright 2022 Centreon (http://www.centreon.com/)
|
||||||
|
#
|
||||||
|
# Centreon is a full-fledged industry-strength solution that meets
|
||||||
|
# the needs in IT infrastructure and application monitoring for
|
||||||
|
# service performance.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
package network::dell::nseries::snmp::mode::interfaces;
|
||||||
|
|
||||||
|
use base qw(snmp_standard::mode::interfaces);
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
sub new {
|
||||||
|
my ($class, %options) = @_;
|
||||||
|
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||||
|
bless $self, $class;
|
||||||
|
|
||||||
|
return $self;
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=head1 MODE
|
||||||
|
|
||||||
|
Check interfaces.
|
||||||
|
|
||||||
|
=over 8
|
||||||
|
|
||||||
|
=item B<--add-global>
|
||||||
|
|
||||||
|
Check global port statistics (By default if no --add-* option is set).
|
||||||
|
|
||||||
|
=item B<--add-status>
|
||||||
|
|
||||||
|
Check interface status.
|
||||||
|
|
||||||
|
=item B<--add-duplex-status>
|
||||||
|
|
||||||
|
Check duplex status (with --warning-status and --critical-status).
|
||||||
|
|
||||||
|
=item B<--add-traffic>
|
||||||
|
|
||||||
|
Check interface traffic.
|
||||||
|
|
||||||
|
=item B<--add-errors>
|
||||||
|
|
||||||
|
Check interface errors.
|
||||||
|
|
||||||
|
=item B<--add-cast>
|
||||||
|
|
||||||
|
Check interface cast.
|
||||||
|
|
||||||
|
=item B<--add-speed>
|
||||||
|
|
||||||
|
Check interface speed.
|
||||||
|
|
||||||
|
=item B<--add-volume>
|
||||||
|
|
||||||
|
Check interface data volume between two checks (not supposed to be graphed, useful for BI reporting).
|
||||||
|
|
||||||
|
=item B<--check-metrics>
|
||||||
|
|
||||||
|
If the expression is true, metrics are checked (Default: '%{opstatus} eq "up"').
|
||||||
|
|
||||||
|
=item B<--warning-status>
|
||||||
|
|
||||||
|
Set warning threshold for status.
|
||||||
|
Can used special variables like: %{admstatus}, %{opstatus}, %{duplexstatus}, %{display}
|
||||||
|
|
||||||
|
=item B<--critical-status>
|
||||||
|
|
||||||
|
Set critical threshold for status (Default: '%{admstatus} eq "up" and %{opstatus} ne "up"').
|
||||||
|
Can used special variables like: %{admstatus}, %{opstatus}, %{duplexstatus}, %{display}
|
||||||
|
|
||||||
|
=item B<--warning-*> B<--critical-*>
|
||||||
|
|
||||||
|
Thresholds.
|
||||||
|
Can be: 'total-port', 'total-admin-up', 'total-admin-down', 'total-oper-up', 'total-oper-down',
|
||||||
|
'in-traffic', 'out-traffic', 'in-error', 'in-discard', 'out-error', 'out-discard',
|
||||||
|
'in-ucast', 'in-bcast', 'in-mcast', 'out-ucast', 'out-bcast', 'out-mcast',
|
||||||
|
'speed' (b/s).
|
||||||
|
|
||||||
|
=item B<--units-traffic>
|
||||||
|
|
||||||
|
Units of thresholds for the traffic (Default: 'percent_delta') ('percent_delta', 'bps', 'counter').
|
||||||
|
|
||||||
|
=item B<--units-errors>
|
||||||
|
|
||||||
|
Units of thresholds for errors/discards (Default: 'percent_delta') ('percent_delta', 'percent', 'delta', 'counter').
|
||||||
|
|
||||||
|
=item B<--units-cast>
|
||||||
|
|
||||||
|
Units of thresholds for communication types (Default: 'percent_delta') ('percent_delta', 'percent', 'delta', 'counter').
|
||||||
|
|
||||||
|
=item B<--nagvis-perfdata>
|
||||||
|
|
||||||
|
Display traffic perfdata to be compatible with nagvis widget.
|
||||||
|
|
||||||
|
=item B<--interface>
|
||||||
|
|
||||||
|
Set the interface (number expected) ex: 1,2,... (empty means 'check all interface').
|
||||||
|
|
||||||
|
=item B<--name>
|
||||||
|
|
||||||
|
Allows to use interface name with option --interface instead of interface oid index (Can be a regexp)
|
||||||
|
|
||||||
|
=item B<--speed>
|
||||||
|
|
||||||
|
Set interface speed for incoming/outgoing traffic (in Mb).
|
||||||
|
|
||||||
|
=item B<--speed-in>
|
||||||
|
|
||||||
|
Set interface speed for incoming traffic (in Mb).
|
||||||
|
|
||||||
|
=item B<--speed-out>
|
||||||
|
|
||||||
|
Set interface speed for outgoing traffic (in Mb).
|
||||||
|
|
||||||
|
=item B<--map-speed-dsl>
|
||||||
|
|
||||||
|
Get interface speed configuration for interface type 'adsl' and 'vdsl2'.
|
||||||
|
|
||||||
|
Syntax: --map-speed-dsl=interface-src-name,interface-dsl-name
|
||||||
|
|
||||||
|
E.g: --map-speed-dsl=Et0.835,Et0-vdsl2
|
||||||
|
|
||||||
|
=item B<--force-counters64>
|
||||||
|
|
||||||
|
Force to use 64 bits counters only. Can be used to improve performance.
|
||||||
|
|
||||||
|
=item B<--force-counters32>
|
||||||
|
|
||||||
|
Force to use 32 bits counters (even in snmp v2c and v3). Should be used when 64 bits counters are buggy.
|
||||||
|
|
||||||
|
=item B<--reload-cache-time>
|
||||||
|
|
||||||
|
Time in minutes before reloading cache file (default: 180).
|
||||||
|
|
||||||
|
=item B<--oid-filter>
|
||||||
|
|
||||||
|
Choose OID used to filter interface (default: ifName) (values: ifDesc, ifAlias, ifName, IpAddr).
|
||||||
|
|
||||||
|
=item B<--oid-display>
|
||||||
|
|
||||||
|
Choose OID used to display interface (default: ifName) (values: ifDesc, ifAlias, ifName, IpAddr).
|
||||||
|
|
||||||
|
=item B<--oid-extra-display>
|
||||||
|
|
||||||
|
Add an OID to display.
|
||||||
|
|
||||||
|
=item B<--display-transform-src>
|
||||||
|
|
||||||
|
Regexp src to transform display value.
|
||||||
|
|
||||||
|
=item B<--display-transform-dst>
|
||||||
|
|
||||||
|
Regexp dst to transform display value.
|
||||||
|
|
||||||
|
=item B<--show-cache>
|
||||||
|
|
||||||
|
Display cache interface datas.
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=cut
|
|
@ -0,0 +1,75 @@
|
||||||
|
#
|
||||||
|
# Copyright 2022 Centreon (http://www.centreon.com/)
|
||||||
|
#
|
||||||
|
# Centreon is a full-fledged industry-strength solution that meets
|
||||||
|
# the needs in IT infrastructure and application monitoring for
|
||||||
|
# service performance.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
package network::dell::nseries::snmp::mode::time;
|
||||||
|
|
||||||
|
use base qw(snmp_standard::mode::ntp);
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Date::Parse;
|
||||||
|
|
||||||
|
sub get_target_time {
|
||||||
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
|
my $oid_agentSystemTime = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.42.1.1.0';
|
||||||
|
my $oid_agentSystemDate = '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.42.1.2.0';
|
||||||
|
my $snmp_result = $options{snmp}->get_leef(oids => [ $oid_agentSystemTime, $oid_agentSystemDate ], nothing_quit => 1);
|
||||||
|
|
||||||
|
my $epoch = Date::Parse::str2time($snmp_result->{$oid_agentSystemDate} . ' ' . $snmp_result->{$oid_agentSystemTime});
|
||||||
|
return $self->get_from_epoch(date => $epoch);
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=head1 MODE
|
||||||
|
|
||||||
|
Check time offset of server with ntp server. Use local time if ntp-host option is not set.
|
||||||
|
SNMP gives a date with second precision (no milliseconds). Time precision is not very accurate.
|
||||||
|
Use threshold with (+-) 2 seconds offset (minimum).
|
||||||
|
|
||||||
|
=over 8
|
||||||
|
|
||||||
|
=item B<--warning-offset>
|
||||||
|
|
||||||
|
Time offset warning threshold (in seconds).
|
||||||
|
|
||||||
|
=item B<--critical-offset>
|
||||||
|
|
||||||
|
Time offset critical Threshold (in seconds).
|
||||||
|
|
||||||
|
=item B<--ntp-hostname>
|
||||||
|
|
||||||
|
Set the ntp hostname (if not set, localtime is used).
|
||||||
|
|
||||||
|
=item B<--ntp-port>
|
||||||
|
|
||||||
|
Set the ntp port (Default: 123).
|
||||||
|
|
||||||
|
=item B<--timezone>
|
||||||
|
|
||||||
|
Set the timezone of distant server. For Windows, you need to set it.
|
||||||
|
Can use format: 'Europe/London' or '+0100'.
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=cut
|
|
@ -0,0 +1,77 @@
|
||||||
|
#
|
||||||
|
# Copyright 2022 Centreon (http://www.centreon.com/)
|
||||||
|
#
|
||||||
|
# Centreon is a full-fledged industry-strength solution that meets
|
||||||
|
# the needs in IT infrastructure and application monitoring for
|
||||||
|
# service performance.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
package network::dell::nseries::snmp::mode::uptime;
|
||||||
|
|
||||||
|
use base qw(snmp_standard::mode::uptime);
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
sub new {
|
||||||
|
my ($class, %options) = @_;
|
||||||
|
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||||
|
bless $self, $class;
|
||||||
|
|
||||||
|
return $self;
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
__END__
|
||||||
|
|
||||||
|
=head1 MODE
|
||||||
|
|
||||||
|
Check system uptime.
|
||||||
|
|
||||||
|
=over 8
|
||||||
|
|
||||||
|
=item B<--warning-uptime>
|
||||||
|
|
||||||
|
Threshold warning.
|
||||||
|
|
||||||
|
=item B<--critical-uptime>
|
||||||
|
|
||||||
|
Threshold critical.
|
||||||
|
|
||||||
|
=item B<--add-sysdesc>
|
||||||
|
|
||||||
|
Display system description.
|
||||||
|
|
||||||
|
=item B<--force-oid>
|
||||||
|
|
||||||
|
Can choose your oid (numeric format only).
|
||||||
|
|
||||||
|
=item B<--check-overload>
|
||||||
|
|
||||||
|
Uptime counter limit is 4294967296 and overflow.
|
||||||
|
With that option, we manage the counter going back. But there is a few chance we can miss a reboot.
|
||||||
|
|
||||||
|
=item B<--reboot-window>
|
||||||
|
|
||||||
|
To be used with check-overload option. Time in milliseconds (Default: 5000)
|
||||||
|
You increase the chance of not missing a reboot if you decrease that value.
|
||||||
|
|
||||||
|
=item B<--unit>
|
||||||
|
|
||||||
|
Select the unit for performance data and thresholds. May be 's' for seconds, 'm' for minutes,
|
||||||
|
'h' for hours, 'd' for days, 'w' for weeks. Default is seconds
|
||||||
|
|
||||||
|
=back
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::dell::n4000::snmp::plugin;
|
package network::dell::nseries::snmp::plugin;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
@ -29,15 +29,16 @@ sub new {
|
||||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$self->{version} = '1.0';
|
$self->{modes} = {
|
||||||
%{$self->{modes}} = (
|
|
||||||
'cpu' => 'centreon::common::dell::fastpath::snmp::mode::cpu',
|
'cpu' => 'centreon::common::dell::fastpath::snmp::mode::cpu',
|
||||||
'environment' => 'centreon::common::dell::fastpath::snmp::mode::environment',
|
'environment' => 'centreon::common::dell::fastpath::snmp::mode::environment',
|
||||||
'global-status' => 'centreon::common::dell::powerconnect3000::mode::globalstatus',
|
'global-status' => 'centreon::common::dell::powerconnect3000::mode::globalstatus',
|
||||||
'interfaces' => 'snmp_standard::mode::interfaces',
|
'interfaces' => 'network::dell::nseries::snmp::mode::interfaces',
|
||||||
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
|
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
|
||||||
'memory' => 'centreon::common::dell::fastpath::snmp::mode::memory',
|
'memory' => 'centreon::common::dell::fastpath::snmp::mode::memory',
|
||||||
);
|
'time' => 'network::dell::nseries::snmp::mode::time',
|
||||||
|
'uptime' => 'network::dell::nseries::snmp::mode::uptime'
|
||||||
|
};
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
@ -48,6 +49,6 @@ __END__
|
||||||
|
|
||||||
=head1 PLUGIN DESCRIPTION
|
=head1 PLUGIN DESCRIPTION
|
||||||
|
|
||||||
Check Dell N4000 series in SNMP.
|
Check Dell N-series in SNMP.
|
||||||
|
|
||||||
=cut
|
=cut
|
Loading…
Reference in New Issue