Debian Codegraph @

src/centreon/common/ibm/nos/snmp/mode/disk.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 centreon::common::ibm::nos::snmp::mode::disk;
22
23 use base qw(snmp_standard::mode::storage);
24
25 use strict;
26 use warnings;
27
28 sub default_storage_type {
29 my ($self, %options) = @_;
30
31 return '^(?!(hrStorageRam)$)';
32 }
33
34 sub prefix_storage_output {
35 my ($self, %options) = @_;
36
37 return "Disk '" . $options{instance_value}->{display} . "' ";
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 Check disks.
55
56 =over 8
57
58 =item B<--warning-usage>
59
60 Warning threshold.
61
62 =item B<--critical-usage>
63
64 Critical threshold.
65
66 =item B<--units>
67
68 Units of thresholds (default: '%') ('%', 'B').
69
70 =item B<--free>
71
72 Thresholds are on free space left.
73
74 =item B<--storage>
75
76 Set the storage (number expected) example: 1, 2,... (empty means 'check all storage').
77
78 =item B<--name>
79
80 Allows to use storage name with option --storage instead of storage oid index.
81
82 =item B<--regexp>
83
84 Allows to use regexp to filter storage (with option --name).
85
86 =item B<--regexp-insensitive>
87
88 Allows to use regexp non case-sensitive (with --regexp).
89
90 =item B<--reload-cache-time>
91
92 Time in minutes before reloading cache file (default: 180).
93
94 =item B<--show-cache>
95
96 Display cache storage data.
97
98 =item B<--filter-storage-type>
99
100 Filter storage types with a regexp (default: '^(?!(hrStorageRam)$)').
101
102 =back
103
104 =cut