+ Fix ironport plugin
This commit is contained in:
parent
211fd1113e
commit
50af2310fe
|
@ -47,7 +47,7 @@ my $oid_fanEntry = '.1.3.6.1.4.1.15497.1.1.1.10.1';
|
|||
sub load {
|
||||
my (%options) = @_;
|
||||
|
||||
push @{$options{request}}, { oid => $oid_fanEntry, end => $mapping->{fanRPMs}->{oid} };
|
||||
push @{$options{request}}, { oid => $oid_fanEntry, start => $mapping->{fanRPMs}->{oid} };
|
||||
}
|
||||
|
||||
sub check {
|
||||
|
|
|
@ -54,7 +54,7 @@ my $oid_powerSupplyEntry = '.1.3.6.1.4.1.15497.1.1.1.8.1';
|
|||
sub load {
|
||||
my (%options) = @_;
|
||||
|
||||
push @{$options{request}}, { oid => $oid_powerSupplyEntry, end => $mapping->{powerSupplyStatus}->{oid} };
|
||||
push @{$options{request}}, { oid => $oid_powerSupplyEntry, start => $mapping->{powerSupplyStatus}->{oid} };
|
||||
}
|
||||
|
||||
sub check {
|
||||
|
|
|
@ -53,7 +53,7 @@ my $oid_raidEntry = '.1.3.6.1.4.1.15497.1.1.1.18.1';
|
|||
sub load {
|
||||
my (%options) = @_;
|
||||
|
||||
push @{$options{request}}, { oid => $oid_raidEntry, end => $mapping->{raidStatus}->{oid} };
|
||||
push @{$options{request}}, { oid => $oid_raidEntry, start => $mapping->{raidStatus}->{oid} };
|
||||
}
|
||||
|
||||
sub check {
|
||||
|
@ -73,7 +73,7 @@ sub check {
|
|||
$self->{components}->{raid}->{total}++;
|
||||
$self->{output}->output_add(long_msg => sprintf("Raid '%s' status is '%s' [instance = %s]",
|
||||
$result->{raidID}, $result->{raidStatus}, $instance));
|
||||
my $exit = $self->get_severity(section => 'psu', value => $result->{raidStatus});
|
||||
my $exit = $self->get_severity(section => 'raid', value => $result->{raidStatus});
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Raid '%s' status is '%s'", $result->{raidID}, $result->{raidStatus}));
|
||||
|
|
|
@ -61,7 +61,7 @@ my $oid_temperatureEntry = '.1.3.6.1.4.1.15497.1.1.1.9.1';
|
|||
sub load {
|
||||
my (%options) = @_;
|
||||
|
||||
push @{$options{request}}, { oid => $oid_temperatureEntry, end => $mapping->{degreesCelsius}->{oid} };
|
||||
push @{$options{request}}, { oid => $oid_temperatureEntry, start => $mapping->{degreesCelsius}->{oid} };
|
||||
}
|
||||
|
||||
sub check {
|
||||
|
|
|
@ -93,7 +93,7 @@ sub run {
|
|||
my $exit_code = $self->{perfdata}->threshold_check(value => $result->{$oid_cacheCpuUsage},
|
||||
threshold => [ { label => 'critical', exit_litteral => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
|
||||
$self->{output}->output_add(severity => $exit_code,
|
||||
short_msg => sprintf("CPU Mail usage is: %.2f%%", $result->{$oid_cacheCpuUsage}));
|
||||
short_msg => sprintf("CPU WebSecurity usage is: %.2f%%", $result->{$oid_cacheCpuUsage}));
|
||||
$self->{output}->perfdata_add(label => 'cpu_websecurity', unit => '%',
|
||||
value => sprintf("%.2f", $result->{$oid_cacheCpuUsage}),
|
||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
|
||||
|
|
Loading…
Reference in New Issue