mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
enh(procurve): environment mode - add temperature component (#3072)
This commit is contained in:
parent
2556ae6045
commit
e7d23192b2
@ -0,0 +1,97 @@
|
|||||||
|
#
|
||||||
|
# Copyright 2021 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::hp::procurve::snmp::mode::components::temperature;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
my $mapping = {
|
||||||
|
name => { oid => '.1.3.6.1.4.1.11.2.14.11.1.2.8.1.1.2' }, # hpSystemAirName
|
||||||
|
value => { oid => '.1.3.6.1.4.1.11.2.14.11.1.2.8.1.1.3' }, # hpSystemAirCurrentTemp
|
||||||
|
threshold => { oid => '.1.3.6.1.4.1.11.2.14.11.1.2.8.1.1.7' } # hpSystemAirThresholdTemp
|
||||||
|
};
|
||||||
|
my $oid_airTempTable = '.1.3.6.1.4.1.11.2.14.11.1.2.8.1'; # hpSystemAirTempTable
|
||||||
|
|
||||||
|
sub load {
|
||||||
|
my ($self) = @_;
|
||||||
|
|
||||||
|
push @{$self->{request}}, {
|
||||||
|
oid => $oid_airTempTable,
|
||||||
|
start => $mapping->{name}->{oid},
|
||||||
|
end => $mapping->{threshold}->{oid}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub check {
|
||||||
|
my ($self) = @_;
|
||||||
|
|
||||||
|
$self->{output}->output_add(long_msg => 'checking temperatures');
|
||||||
|
$self->{components}->{temperature} = { name => 'temperatures', total => 0, skip => 0 };
|
||||||
|
return if ($self->check_filter(section => 'temperature'));
|
||||||
|
|
||||||
|
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{ $oid_airTempTable }})) {
|
||||||
|
next if ($oid !~ /^$mapping->{name}->{oid}\.(.*)$/);
|
||||||
|
my $instance = $1;
|
||||||
|
|
||||||
|
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{ $oid_airTempTable }, instance => $instance);
|
||||||
|
|
||||||
|
next if ($self->check_filter(section => 'temperature', instance => $instance));
|
||||||
|
|
||||||
|
next if ($result->{value} !~ /^(\d+)C/i);
|
||||||
|
my $value = $1;
|
||||||
|
|
||||||
|
$self->{components}->{temperature}->{total}++;
|
||||||
|
$self->{output}->output_add(
|
||||||
|
long_msg => sprintf(
|
||||||
|
"temperature '%s' is '%s' celsius [instance: %s]",
|
||||||
|
$result->{name}, $value, $instance
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
my ($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'temperature', instance => $instance, value => $value);
|
||||||
|
if ($checked == 0 && $result->{threshold} =~ /^(\d+)C/i) {
|
||||||
|
my $crit_th = $1;
|
||||||
|
$self->{perfdata}->threshold_validate(label => 'critical-temperature-instance-' . $instance, value => $crit_th);
|
||||||
|
|
||||||
|
$crit = $self->{perfdata}->get_perfdata_for_output(label => 'critical-temperature-instance-' . $instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||||
|
$self->{output}->output_add(
|
||||||
|
severity => $exit,
|
||||||
|
short_msg => sprintf(
|
||||||
|
"temperature '%s' is '%s' celsius", $result->{name}, $value
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$self->{output}->perfdata_add(
|
||||||
|
nlabel => 'hardware.temperature.celsius',
|
||||||
|
unit => 'C',
|
||||||
|
instances => $result->{name},
|
||||||
|
value => $value,
|
||||||
|
warning => $warn,
|
||||||
|
critical => $crit
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
@ -28,6 +28,8 @@ use warnings;
|
|||||||
sub set_system {
|
sub set_system {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
|
$self->{regexp_threshold_numeric_check_section_option} = '^temperature$';
|
||||||
|
|
||||||
$self->{cb_hook2} = 'snmp_execute';
|
$self->{cb_hook2} = 'snmp_execute';
|
||||||
|
|
||||||
$self->{thresholds} = {
|
$self->{thresholds} = {
|
||||||
@ -36,7 +38,7 @@ sub set_system {
|
|||||||
['bad', 'CRITICAL'],
|
['bad', 'CRITICAL'],
|
||||||
['warning', 'WARNING'],
|
['warning', 'WARNING'],
|
||||||
['good', 'OK'],
|
['good', 'OK'],
|
||||||
['not present', 'WARNING'],
|
['not present', 'OK']
|
||||||
],
|
],
|
||||||
psu => [
|
psu => [
|
||||||
['psNotPresent', 'OK'],
|
['psNotPresent', 'OK'],
|
||||||
@ -47,7 +49,7 @@ sub set_system {
|
|||||||
['psMax', 'WARNING'],
|
['psMax', 'WARNING'],
|
||||||
['psAuxFailure', 'CRITICAL'],
|
['psAuxFailure', 'CRITICAL'],
|
||||||
['psNotPowered', 'WARNING'],
|
['psNotPowered', 'WARNING'],
|
||||||
['psAuxNotPowered', 'CRITICAL'],
|
['psAuxNotPowered', 'CRITICAL']
|
||||||
],
|
],
|
||||||
fan => [
|
fan => [
|
||||||
['failed', 'CRITICAL'],
|
['failed', 'CRITICAL'],
|
||||||
@ -56,12 +58,12 @@ sub set_system {
|
|||||||
['underspeed', 'WARNING'],
|
['underspeed', 'WARNING'],
|
||||||
['overspeed', 'WARNING'],
|
['overspeed', 'WARNING'],
|
||||||
['ok', 'OK'],
|
['ok', 'OK'],
|
||||||
['maxstate', 'WARNING'],
|
['maxstate', 'WARNING']
|
||||||
],
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
$self->{components_path} = 'network::hp::procurve::snmp::mode::components';
|
$self->{components_path} = 'network::hp::procurve::snmp::mode::components';
|
||||||
$self->{components_module} = ['sensor', 'psu', 'fan'];
|
$self->{components_module} = ['fan', 'psu', 'sensor', 'temperature'];
|
||||||
}
|
}
|
||||||
|
|
||||||
sub snmp_execute {
|
sub snmp_execute {
|
||||||
@ -73,7 +75,7 @@ sub snmp_execute {
|
|||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ($class, %options) = @_;
|
my ($class, %options) = @_;
|
||||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, no_performance => 1);
|
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 => {
|
||||||
@ -95,7 +97,7 @@ Check sensors (hpicfChassis.mib).
|
|||||||
=item B<--component>
|
=item B<--component>
|
||||||
|
|
||||||
Which component to check (Default: '.*').
|
Which component to check (Default: '.*').
|
||||||
Can be: 'sensor', 'psu', 'fan'.
|
Can be: 'fan', 'psu', 'sensor', 'temperature'.
|
||||||
|
|
||||||
=item B<--filter>
|
=item B<--filter>
|
||||||
|
|
||||||
@ -118,7 +120,16 @@ Set to overload default threshold values (syntax: section,[instance,]status,rege
|
|||||||
It used before default thresholds (order stays).
|
It used before default thresholds (order stays).
|
||||||
Example: --threshold-overload='sensor,CRITICAL,^(?!(good)$)'
|
Example: --threshold-overload='sensor,CRITICAL,^(?!(good)$)'
|
||||||
|
|
||||||
|
=item B<--warning>
|
||||||
|
|
||||||
|
Set warning threshold for 'temperature' (syntax: type,regexp,threshold)
|
||||||
|
Example: --warning='temperature,.*,40'
|
||||||
|
|
||||||
|
=item B<--critical>
|
||||||
|
|
||||||
|
Set critical threshold for 'temperature' (syntax: type,regexp,threshold)
|
||||||
|
Example: --critical='temperature,.*,50'
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
@ -30,10 +30,9 @@ sub new {
|
|||||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
||||||
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;
|
||||||
@ -64,8 +63,10 @@ sub run {
|
|||||||
my $oid_hpGlobalMemFreeBytes = '.1.3.6.1.4.1.11.2.14.11.5.1.1.2.2.1.1.6'; # in B
|
my $oid_hpGlobalMemFreeBytes = '.1.3.6.1.4.1.11.2.14.11.5.1.1.2.2.1.1.6'; # in B
|
||||||
my $result = $self->{snmp}->get_table(oid => $oid_hpGlobalMemEntry, nothing_quit => 1);
|
my $result = $self->{snmp}->get_table(oid => $oid_hpGlobalMemEntry, nothing_quit => 1);
|
||||||
|
|
||||||
$self->{output}->output_add(severity => 'OK',
|
$self->{output}->output_add(
|
||||||
short_msg => 'All memories are ok.');
|
severity => 'OK',
|
||||||
|
short_msg => 'All memories are ok.'
|
||||||
|
);
|
||||||
|
|
||||||
foreach my $oid (keys %$result) {
|
foreach my $oid (keys %$result) {
|
||||||
next if ($oid !~ /^$oid_hpGlobalMemSlotIndex/);
|
next if ($oid !~ /^$oid_hpGlobalMemSlotIndex/);
|
||||||
@ -82,23 +83,33 @@ sub run {
|
|||||||
my ($used_value, $used_unit) = $self->{perfdata}->change_bytes(value => $memory_used);
|
my ($used_value, $used_unit) = $self->{perfdata}->change_bytes(value => $memory_used);
|
||||||
my ($free_value, $free_unit) = $self->{perfdata}->change_bytes(value => $memory_free);
|
my ($free_value, $free_unit) = $self->{perfdata}->change_bytes(value => $memory_free);
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("Memory '%s' Total: %s Used: %s (%.2f%%) Free: %s (%.2f%%)", $instance,
|
$self->{output}->output_add(
|
||||||
|
long_msg => sprintf(
|
||||||
|
"Memory '%s' Total: %s Used: %s (%.2f%%) Free: %s (%.2f%%)", $instance,
|
||||||
$total_value . " " . $total_unit,
|
$total_value . " " . $total_unit,
|
||||||
$used_value . " " . $used_unit, $prct_used,
|
$used_value . " " . $used_unit, $prct_used,
|
||||||
$free_value . " " . $free_unit, $prct_free));
|
$free_value . " " . $free_unit, $prct_free
|
||||||
|
)
|
||||||
|
);
|
||||||
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("Memory '%s' Total: %s Used: %s (%.2f%%) Free: %s (%.2f%%)", $instance,
|
severity => $exit,
|
||||||
|
short_msg => sprintf(
|
||||||
|
"Memory '%s' Total: %s Used: %s (%.2f%%) Free: %s (%.2f%%)", $instance,
|
||||||
$total_value . " " . $total_unit,
|
$total_value . " " . $total_unit,
|
||||||
$used_value . " " . $used_unit, $prct_used,
|
$used_value . " " . $used_unit, $prct_used,
|
||||||
$free_value . " " . $free_unit, $prct_free));
|
$free_value . " " . $free_unit, $prct_free
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{output}->perfdata_add(label => "used_" . $instance, unit => 'B',
|
$self->{output}->perfdata_add(
|
||||||
|
label => "used_" . $instance, unit => 'B',
|
||||||
value => $memory_used,
|
value => $memory_used,
|
||||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size),
|
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size),
|
||||||
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size),
|
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size),
|
||||||
min => 0, max => $total_size);
|
min => 0, max => $total_size
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{output}->display();
|
$self->{output}->display();
|
||||||
|
@ -76,7 +76,8 @@ sub custom_memory_usage_output {
|
|||||||
my ($total_size_value, $total_size_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{total});
|
my ($total_size_value, $total_size_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{total});
|
||||||
my ($total_used_value, $total_used_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{used});
|
my ($total_used_value, $total_used_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{used});
|
||||||
my ($total_free_value, $total_free_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{free});
|
my ($total_free_value, $total_free_unit) = $self->{perfdata}->change_bytes(value => $self->{result_values}->{free});
|
||||||
my $msg = sprintf("memory usage total: %s used: %s (%.2f%%) free: %s (%.2f%%)",
|
my $msg = sprintf(
|
||||||
|
"memory usage total: %s used: %s (%.2f%%) free: %s (%.2f%%)",
|
||||||
$total_size_value . " " . $total_size_unit,
|
$total_size_value . " " . $total_size_unit,
|
||||||
$total_used_value . " " . $total_used_unit, $self->{result_values}->{prct_used},
|
$total_used_value . " " . $total_used_unit, $self->{result_values}->{prct_used},
|
||||||
$total_free_value . " " . $total_free_unit, $self->{result_values}->{prct_free}
|
$total_free_value . " " . $total_free_unit, $self->{result_values}->{prct_free}
|
||||||
@ -103,17 +104,17 @@ sub set_counters {
|
|||||||
closure_custom_calc => \&catalog_status_calc,
|
closure_custom_calc => \&catalog_status_calc,
|
||||||
closure_custom_output => $self->can('custom_status_output'),
|
closure_custom_output => $self->can('custom_status_output'),
|
||||||
closure_custom_perfdata => sub { return 0; },
|
closure_custom_perfdata => sub { return 0; },
|
||||||
closure_custom_threshold_check => \&catalog_status_threshold,
|
closure_custom_threshold_check => \&catalog_status_threshold
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'members-total', nlabel => 'stack.members.total.count', set => {
|
{ label => 'members-total', nlabel => 'stack.members.total.count', set => {
|
||||||
key_values => [ { name => 'members'} ],
|
key_values => [ { name => 'members' } ],
|
||||||
output_template => 'total members: %s',
|
output_template => 'total members: %s',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ value => 'members', template => '%s', min => 0 },
|
{ template => '%s', min => 0 }
|
||||||
],
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$self->{maps_counters}->{member_global} = [
|
$self->{maps_counters}->{member_global} = [
|
||||||
@ -122,45 +123,45 @@ sub set_counters {
|
|||||||
closure_custom_calc => $self->can('custom_member_status_calc'),
|
closure_custom_calc => $self->can('custom_member_status_calc'),
|
||||||
closure_custom_output => $self->can('custom_member_status_output'),
|
closure_custom_output => $self->can('custom_member_status_output'),
|
||||||
closure_custom_perfdata => sub { return 0; },
|
closure_custom_perfdata => sub { return 0; },
|
||||||
closure_custom_threshold_check => \&catalog_status_threshold,
|
closure_custom_threshold_check => \&catalog_status_threshold
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'cpu-utilization', nlabel => 'member.cpu.utilization.percentage', set => {
|
{ label => 'cpu-utilization', nlabel => 'member.cpu.utilization.percentage', set => {
|
||||||
key_values => [ { name => 'cpu'}, { name => 'display'} ],
|
key_values => [ { name => 'cpu' }, { name => 'display'} ],
|
||||||
output_template => 'cpu usage: %.2f%%',
|
output_template => 'cpu usage: %.2f%%',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ value => 'cpu', template => '%.2f', unit => '%', min => 0, max => 100,
|
{ template => '%.2f', unit => '%', min => 0, max => 100,
|
||||||
label_extra_instance => 1 },
|
label_extra_instance => 1 }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'memory-usage', nlabel => 'member.memory.usage.bytes', set => {
|
{ label => 'memory-usage', nlabel => 'member.memory.usage.bytes', set => {
|
||||||
key_values => [ { name => 'used' }, { name => 'free' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' }, { name => 'display' } ],
|
key_values => [ { name => 'used' }, { name => 'free' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' }, { name => 'display' } ],
|
||||||
closure_custom_output => $self->can('custom_memory_usage_output'),
|
closure_custom_output => $self->can('custom_memory_usage_output'),
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ value => 'used', template => '%d', min => 0, max => 'total',
|
{ template => '%d', min => 0, max => 'total',
|
||||||
unit => 'B', cast_int => 1, label_extra_instance => 1 },
|
unit => 'B', cast_int => 1, label_extra_instance => 1 }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'memory-usage-free', display_ok => 0, nlabel => 'member.memory.free.bytes', set => {
|
{ label => 'memory-usage-free', display_ok => 0, nlabel => 'member.memory.free.bytes', set => {
|
||||||
key_values => [ { name => 'free' }, { name => 'used' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' }, { name => 'display' } ],
|
key_values => [ { name => 'free' }, { name => 'used' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' }, { name => 'display' } ],
|
||||||
closure_custom_output => $self->can('custom_memory_usage_output'),
|
closure_custom_output => $self->can('custom_memory_usage_output'),
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ value => 'free', template => '%d', min => 0, max => 'total',
|
{ template => '%d', min => 0, max => 'total',
|
||||||
unit => 'B', cast_int => 1, label_extra_instance => 1 },
|
unit => 'B', cast_int => 1, label_extra_instance => 1 }
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'memory-usage-prct', display_ok => 0, nlabel => 'member.memory.usage.percentage', set => {
|
{ label => 'memory-usage-prct', display_ok => 0, nlabel => 'member.memory.usage.percentage', set => {
|
||||||
key_values => [ { name => 'prct_used' }, { name => 'display' } ],
|
key_values => [ { name => 'prct_used' }, { name => 'display' } ],
|
||||||
output_template => 'memory used : %.2f %%',
|
output_template => 'memory used : %.2f %%',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ value => 'prct_used', template => '%.2f', min => 0, max => 100,
|
{ template => '%.2f', min => 0, max => 100,
|
||||||
unit => '%', label_extra_instance => 1 },
|
unit => '%', label_extra_instance => 1 }
|
||||||
],
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$self->{maps_counters}->{link} = [
|
$self->{maps_counters}->{link} = [
|
||||||
@ -169,9 +170,9 @@ sub set_counters {
|
|||||||
closure_custom_calc => \&catalog_status_calc,
|
closure_custom_calc => \&catalog_status_calc,
|
||||||
closure_custom_output => $self->can('custom_link_status_output'),
|
closure_custom_output => $self->can('custom_link_status_output'),
|
||||||
closure_custom_perfdata => sub { return 0; },
|
closure_custom_perfdata => sub { return 0; },
|
||||||
closure_custom_threshold_check => \&catalog_status_threshold,
|
closure_custom_threshold_check => \&catalog_status_threshold
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,18 +248,18 @@ my $mapping_link_status = {
|
|||||||
|
|
||||||
my $mapping = {
|
my $mapping = {
|
||||||
hpicfVsfVCOperStatus => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.1.2', map => $mapping_oper_status },
|
hpicfVsfVCOperStatus => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.1.2', map => $mapping_oper_status },
|
||||||
hpicfVsfVCAdminStatus => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.1.3', map => $mapping_admin_status },
|
hpicfVsfVCAdminStatus => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.1.3', map => $mapping_admin_status }
|
||||||
};
|
};
|
||||||
my $mapping2 = {
|
my $mapping2 = {
|
||||||
hpicfVsfVCMemberState => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.9', map => $mapping_member_state },
|
hpicfVsfVCMemberState => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.9', map => $mapping_member_state },
|
||||||
hpicfVsfVCMemberSerialNum => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.14' },
|
hpicfVsfVCMemberSerialNum => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.14' },
|
||||||
hpicfVsfVCMemberCpuUtil => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.19' },
|
hpicfVsfVCMemberCpuUtil => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.19' },
|
||||||
hpicfVsfVCMemberTotalMemory => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.20' },
|
hpicfVsfVCMemberTotalMemory => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.20' },
|
||||||
hpicfVsfVCMemberFreeMemory => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.21' },
|
hpicfVsfVCMemberFreeMemory => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1.21' }
|
||||||
};
|
};
|
||||||
my $mapping3 = {
|
my $mapping3 = {
|
||||||
hpicfVsfVCLinkName => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.4.1.3' },
|
hpicfVsfVCLinkName => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.4.1.3' },
|
||||||
hpicfVsfVCLinkOperStatus => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.4.1.4', map => $mapping_link_status },
|
hpicfVsfVCLinkOperStatus => { oid => '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.4.1.4', map => $mapping_link_status }
|
||||||
};
|
};
|
||||||
my $oid_hpicfVsfVCConfig = '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.1';
|
my $oid_hpicfVsfVCConfig = '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.1';
|
||||||
my $oid_hpicfVsfVCMemberEntry = '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1';
|
my $oid_hpicfVsfVCMemberEntry = '.1.3.6.1.4.1.11.2.14.11.5.1.116.1.3.1';
|
||||||
|
@ -30,14 +30,14 @@ sub new {
|
|||||||
bless $self, $class;
|
bless $self, $class;
|
||||||
|
|
||||||
$self->{version} = '1.0';
|
$self->{version} = '1.0';
|
||||||
%{$self->{modes}} = (
|
$self->{modes} = {
|
||||||
'cpu' => 'network::hp::procurve::snmp::mode::cpu',
|
'cpu' => 'network::hp::procurve::snmp::mode::cpu',
|
||||||
'environment' => 'network::hp::procurve::snmp::mode::environment',
|
'environment' => 'network::hp::procurve::snmp::mode::environment',
|
||||||
'interfaces' => 'snmp_standard::mode::interfaces',
|
'interfaces' => 'snmp_standard::mode::interfaces',
|
||||||
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
|
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
|
||||||
'memory' => 'network::hp::procurve::snmp::mode::memory',
|
'memory' => 'network::hp::procurve::snmp::mode::memory',
|
||||||
'virtual-chassis' => 'network::hp::procurve::snmp::mode::virtualchassis',
|
'virtual-chassis' => 'network::hp::procurve::snmp::mode::virtualchassis'
|
||||||
);
|
};
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user