Debian Codegraph @

src/storage/lenovo/iomega/snmp/mode/interfaces.pm

raw
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 storage::lenovo::iomega::snmp::mode::interfaces;
22
23 use base qw(snmp_standard::mode::interfaces);
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);
43 bless $self, $class;
44
45 return $self;
46 }
47
48
49 1;
50
51 __END__
52
53 =head1 MODE
54
55 Check interfaces.
56
57 =over 8
58
59 =item B<--add-global>
60
61 Check global port statistics (by default if no --add-* option is set).
62
63 =item B<--add-status>
64
65 Check interface status.
66
67 =item B<--add-duplex-status>
68
69 Check duplex status (with --warning-status and --critical-status).
70
71 =item B<--add-traffic>
72
73 Check interface traffic.
74
75 =item B<--add-errors>
76
77 Check interface errors.
78
79 =item B<--add-cast>
80
81 Check interface cast.
82
83 =item B<--add-speed>
84
85 Check interface speed.
86
87 =item B<--add-volume>
88
89 Check interface data volume between two checks (not supposed to be graphed, useful for BI reporting).
90
91 =item B<--check-metrics>
92
93 If the expression is true, metrics are checked (default: '%{opstatus} eq "up"').
94
95 =item B<--warning-status>
96
97 Define the conditions to match for the status to be WARNING.
98 You can use the following variables: %{admstatus}, %{opstatus}, %{duplexstatus}, %{display}
99
100 =item B<--critical-status>
101
102 Define the conditions to match for the status to be CRITICAL (default: '%{admstatus} eq "up" and %{opstatus} ne "up"').
103 You can use the following variables: %{admstatus}, %{opstatus}, %{duplexstatus}, %{display}
104
105 =item B<--warning-*> B<--critical-*>
106
107 Thresholds.
108 Can be: 'total-port', 'total-admin-up', 'total-admin-down', 'total-oper-up', 'total-oper-down',
109 'in-traffic', 'out-traffic', 'in-error', 'in-discard', 'out-error', 'out-discard',
110 'in-ucast', 'in-bcast', 'in-mcast', 'out-ucast', 'out-bcast', 'out-mcast',
111 'speed' (b/s).
112
113 =item B<--units-traffic>
114
115 Units of thresholds for the traffic (default: 'percent_delta') ('percent_delta', 'bps', 'counter').
116
117 =item B<--units-errors>
118
119 Units of thresholds for errors/discards (default: 'percent_delta') ('percent_delta', 'percent', 'delta', 'deltaps', 'counter').
120
121 =item B<--units-cast>
122
123 Units of thresholds for communication types (default: 'percent_delta') ('percent_delta', 'percent', 'delta', 'deltaps', 'counter').
124
125 =item B<--nagvis-perfdata>
126
127 Display traffic perfdata to be compatible with nagvis widget.
128
129 =item B<--interface>
130
131 Set the interface (number expected) example: 1,2,... (empty means 'check all interfaces').
132
133 =item B<--name>
134
135 Allows you to define the interface (in option --interface) by name instead of OID index. The name matching mode supports regular expressions.
136
137 =item B<--speed>
138
139 Set interface speed for incoming/outgoing traffic (in Mb).
140
141 =item B<--speed-in>
142
143 Set interface speed for incoming traffic (in Mb).
144
145 =item B<--speed-out>
146
147 Set interface speed for outgoing traffic (in Mb).
148
149 =item B<--force-counters32>
150
151 Force to use 32 bits counters (even in snmp v2c and v3). Should be used when 64 bits counters are buggy.
152
153 =item B<--reload-cache-time>
154
155 Time in minutes before reloading cache file (default: 180).
156
157 =item B<--oid-filter>
158
159 Define the OID to be used to filter interfaces (default: ifDesc) (values: ifDesc, ifAlias, ifName, IpAddr).
160
161 =item B<--oid-display>
162
163 Define the OID that will be used to name the interfaces (default: ifDesc) (values: ifDesc, ifAlias, ifName, IpAddr).
164
165 =item B<--oid-extra-display>
166
167 Add an OID to display.
168
169 =item B<--display-transform-src> B<--display-transform-dst>
170
171 Modify the interface name displayed by using a regular expression.
172
173 Example: adding --display-transform-src='eth' --display-transform-dst='ens' will replace all occurrences of 'eth' with 'ens'
174
175 =item B<--show-cache>
176
177 Display cache interface data.
178
179 =back
180
181 =cut