| 1 |
# |
| 2 |
# Copyright 2024 Centreon (http://www.centreon.com/) |
| 3 |
# |
| 4 |
# Centreon is a full-fledged industry-strength solution that meets |
| 5 |
# the needs in IT infrastructure and application monitoring for |
| 6 |
# service performance. |
| 7 |
# |
| 8 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 |
# you may not use this file except in compliance with the License. |
| 10 |
# You may obtain a copy of the License at |
| 11 |
# |
| 12 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 13 |
# |
| 14 |
# Unless required by applicable law or agreed to in writing, software |
| 15 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 16 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 |
# See the License for the specific language governing permissions and |
| 18 |
# limitations under the License. |
| 19 |
# |
| 20 |
|
| 21 |
package centreon::common::bluearc::snmp::mode::listinterfaces; |
| 22 |
|
| 23 |
use base qw(snmp_standard::mode::listinterfaces); |
| 24 |
|
| 25 |
use strict; |
| 26 |
use warnings; |
| 27 |
|
| 28 |
sub default_oid_filter_name { |
| 29 |
my ($self, %options) = @_; |
| 30 |
|
| 31 |
return 'ifdesc'; |
| 32 |
} |
| 33 |
|
| 34 |
sub default_oid_display_name { |
| 35 |
my ($self, %options) = @_; |
| 36 |
|
| 37 |
return 'ifdesc'; |
| 38 |
} |
| 39 |
|
| 40 |
sub new { |
| 41 |
my ($class, %options) = @_; |
| 42 |
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1); |
| 43 |
bless $self, $class; |
| 44 |
|
| 45 |
return $self; |
| 46 |
} |
| 47 |
|
| 48 |
1; |
| 49 |
|
| 50 |
__END__ |
| 51 |
|
| 52 |
=head1 MODE |
| 53 |
|
| 54 |
=over 8 |
| 55 |
|
| 56 |
=item B<--interface> |
| 57 |
|
| 58 |
Set the interface (number expected) example: 1,2,... (empty means 'check all interfaces'). |
| 59 |
|
| 60 |
=item B<--name> |
| 61 |
|
| 62 |
Allows you to define the interface (in option --interface) by name instead of OID index. The name matching mode supports regular expressions. |
| 63 |
|
| 64 |
=item B<--speed> |
| 65 |
|
| 66 |
Set interface speed (in Mb). |
| 67 |
|
| 68 |
=item B<--skip-speed0> |
| 69 |
|
| 70 |
Don't display interface with speed 0. |
| 71 |
|
| 72 |
=item B<--filter-status> |
| 73 |
|
| 74 |
Display interfaces matching the filter (example: 'up'). |
| 75 |
|
| 76 |
=item B<--use-adminstatus> |
| 77 |
|
| 78 |
Display interfaces with AdminStatus 'up'. |
| 79 |
|
| 80 |
=item B<--oid-filter> |
| 81 |
|
| 82 |
Define the OID to be used to filter interfaces (default: ifDesc) (values: ifDesc, ifAlias, ifName). |
| 83 |
|
| 84 |
=item B<--oid-display> |
| 85 |
|
| 86 |
Define the OID that will be used to name the interfaces (default: ifDesc) (values: ifDesc, ifAlias, ifName). |
| 87 |
|
| 88 |
=item B<--display-transform-src> B<--display-transform-dst> |
| 89 |
|
| 90 |
Modify the interface name displayed by using a regular expression. |
| 91 |
|
| 92 |
Example: adding --display-transform-src='eth' --display-transform-dst='ens' will replace all occurrences of 'eth' with 'ens' |
| 93 |
|
| 94 |
=item B<--add-extra-oid> |
| 95 |
|
| 96 |
Display an OID. |
| 97 |
Example: --add-extra-oid='alias,.1.3.6.1.2.1.31.1.1.1.18' |
| 98 |
or --add-extra-oid='vlan,.1.3.6.1.2.1.31.19,%{instance}\..*' |
| 99 |
|
| 100 |
=item B<--add-mac-address> |
| 101 |
|
| 102 |
Display interface mac address. |
| 103 |
|
| 104 |
=back |
| 105 |
|
| 106 |
=cut |