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