-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into CTOR-1039-netapp-ontap-rest-api-volumes-a…
…dd-logical-space-metrics
- Loading branch information
Showing
48 changed files
with
3,679 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packaging/centreon-plugin-Operatingsystems-Freebsd-Snmp/deb.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"dependencies": [ | ||
"libsnmp-perl", | ||
"libdatetime-perl" | ||
"libdatetime-perl", | ||
"libnet-ntp-perl" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packaging/centreon-plugin-Operatingsystems-Freebsd-Snmp/rpm.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"dependencies": [ | ||
"perl(SNMP)", | ||
"perl(DateTime)" | ||
"perl(DateTime)", | ||
"perl(Net::NTP)" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/hardware/server/lenovo/xcc/snmp/mode/components/cpu.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package hardware::server::lenovo::xcc::snmp::mode::components::cpu; | ||
use strict; | ||
use warnings FATAL => 'all'; | ||
|
||
use strict; | ||
use warnings; | ||
use centreon::plugins::misc; | ||
|
||
my $mapping = { | ||
cpuStatus => { oid => '.1.3.6.1.4.1.19046.11.1.1.5.20.1.11' }, | ||
cpuString => { oid => '.1.3.6.1.4.1.19046.11.1.1.5.20.1.2' }, | ||
}; | ||
|
||
my $oid_cpuEntry = '.1.3.6.1.4.1.19046.11.1.1.5.20.1'; | ||
|
||
sub load { | ||
my ($self) = @_; | ||
|
||
push @{$self->{request}}, { oid => $oid_cpuEntry }; | ||
} | ||
sub check { | ||
my ($self) = @_; | ||
|
||
$self->{output}->output_add(long_msg => "Checking cpu"); | ||
$self->{components}->{cpu} = { name => 'cpu', total => 0, skip => 0 }; | ||
return if ($self->check_filter(section => 'cpu')); | ||
|
||
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_cpuEntry}})) { | ||
|
||
next if ($oid !~ /^$mapping->{cpuString}->{oid}\.(.*)$/); | ||
|
||
my $instance = $1; | ||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_cpuEntry}, instance => $instance); | ||
next if ($self->check_filter(section => 'cpu', instance => $instance)); | ||
$result->{cpuStatus} = centreon::plugins::misc::trim($result->{cpuStatus}); | ||
$self->{components}->{cpu}->{total}++; | ||
|
||
$self->{output}->output_add(long_msg => sprintf("'%s' status is %s [instance: %s].", | ||
$result->{cpuString}, $result->{cpuStatus}, $instance)); | ||
|
||
my $exit = $self->get_severity(label => 'default', section => 'default', value => $result->{cpuStatus}); | ||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { | ||
$self->{output}->output_add(severity => $exit, | ||
short_msg => sprintf("'%s' cpu status for '%s'", $result->{cpuStatus}, $result->{cpuString})); | ||
} | ||
} | ||
} | ||
1; |
68 changes: 68 additions & 0 deletions
68
src/hardware/server/lenovo/xcc/snmp/mode/components/health.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# | ||
# Copyright 2024 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 hardware::server::lenovo::xcc::snmp::mode::components::health; | ||
use Data::Dumper; | ||
|
||
use strict; | ||
use warnings; | ||
use centreon::plugins::misc; | ||
|
||
my $mapping = { | ||
healthStatus => { oid => '.1.3.6.1.4.1.19046.11.1.1.4.2.1.2' }, | ||
healthString => { oid => '.1.3.6.1.4.1.19046.11.1.1.4.2.1.3' }, | ||
}; | ||
|
||
my $oid_healthEntry = '.1.3.6.1.4.1.19046.11.1.1.4.2.1'; | ||
|
||
sub load { | ||
my ($self) = @_; | ||
|
||
push @{$self->{request}}, { oid => $oid_healthEntry }; | ||
} | ||
sub check { | ||
my ($self) = @_; | ||
|
||
$self->{output}->output_add(long_msg => "Checking health"); | ||
$self->{components}->{health} = { name => 'health', total => 0, skip => 0 }; | ||
return if ($self->check_filter(section => 'health')); | ||
|
||
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_healthEntry}})) { | ||
|
||
next if ($oid !~ /^$mapping->{healthString}->{oid}\.(.*)$/); | ||
|
||
my $instance = $1; | ||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_healthEntry}, instance => $instance); | ||
next if ($self->check_filter(section => 'health', instance => $instance)); | ||
$result->{healthStatus} = centreon::plugins::misc::trim($result->{healthStatus}); | ||
$self->{components}->{health}->{total}++; | ||
|
||
$self->{output}->output_add(long_msg => sprintf("health '%s' status is %s [instance: %s].", | ||
$result->{healthString}, $result->{healthStatus}, $instance)); | ||
|
||
my $exit = $self->get_severity(label => 'default', section => 'default', value => $result->{healthStatus}); | ||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { | ||
$self->{output}->output_add(severity => $exit, | ||
short_msg => sprintf("'%s' health status for '%s'", $result->{healthStatus}, $result->{healthString})); | ||
} | ||
} | ||
} | ||
|
||
1; |
48 changes: 48 additions & 0 deletions
48
src/hardware/server/lenovo/xcc/snmp/mode/components/memory.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package hardware::server::lenovo::xcc::snmp::mode::components::memory; | ||
use strict; | ||
use warnings; | ||
|
||
use strict; | ||
use warnings; | ||
use centreon::plugins::misc; | ||
|
||
my $mapping = { | ||
memoryStatus => { oid => '.1.3.6.1.4.1.19046.11.1.1.5.21.1.8' }, | ||
memoryString => { oid => '.1.3.6.1.4.1.19046.11.1.1.5.21.1.2' }, | ||
}; | ||
|
||
my $oid_memoryEntry = '.1.3.6.1.4.1.19046.11.1.1.5.21.1'; | ||
|
||
sub load { | ||
my ($self) = @_; | ||
|
||
push @{$self->{request}}, { oid => $oid_memoryEntry }; | ||
} | ||
sub check { | ||
my ($self) = @_; | ||
|
||
$self->{output}->output_add(long_msg => "Checking memory"); | ||
$self->{components}->{memory} = { name => 'memory', total => 0, skip => 0 }; | ||
return if ($self->check_filter(section => 'memory')); | ||
|
||
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_memoryEntry}})) { | ||
|
||
next if ($oid !~ /^$mapping->{memoryString}->{oid}\.(.*)$/); | ||
|
||
my $instance = $1; | ||
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_memoryEntry}, instance => $instance); | ||
next if ($self->check_filter(section => 'memory', instance => $instance)); | ||
$result->{memoryStatus} = centreon::plugins::misc::trim($result->{memoryStatus}); | ||
$self->{components}->{memory}->{total}++; | ||
|
||
$self->{output}->output_add(long_msg => sprintf("'%s' status is %s [instance: %s].", | ||
$result->{memoryString}, $result->{memoryStatus}, $instance)); | ||
|
||
my $exit = $self->get_severity(label => 'default', section => 'default', value => $result->{memoryStatus}); | ||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { | ||
$self->{output}->output_add(severity => $exit, | ||
short_msg => sprintf("'%s' memory status for '%s'", $result->{memoryStatus}, $result->{memoryString})); | ||
} | ||
} | ||
} | ||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.