Debian Codegraph @

src/os/freebsd/snmp/mode/storage.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 os::freebsd::snmp::mode::storage;
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 '^(hrStorageFixedDisk|hrStorageNetworkDisk|hrFSBerkeleyFFS|hrFSOther)$';
32 }
33
34 1;
35
36 __END__
37
38 =head1 MODE
39
40 Check storage system.
41
42 =over 8
43
44 =item B<--warning-usage>
45
46 Warning threshold.
47
48 =item B<--critical-usage>
49
50 Critical threshold.
51
52 =item B<--warning-access>
53
54 Warning threshold.
55
56 =item B<--critical-access>
57
58 Critical threshold.
59 Check if storage is C<readOnly>: C<--critical-access=readOnly>
60
61 =item B<--add-access>
62
63 Check storage access (C<readOnly>, C<readWrite>).
64
65 =item B<--units>
66
67 Units of thresholds (default: '%') ('%', 'B').
68
69 =item B<--free>
70
71 Thresholds are on free space left.
72
73 =item B<--storage>
74
75 Define the storage filter on IDs (OID indexes, e.g.: 1,2,...). If empty, all storage systems will be monitored.
76 To filter on storage names, see C<--name>.
77
78 =item B<--name>
79
80 Allows to use storage name with option C<--storage> instead of storage OID index.
81
82 =item B<--regexp>
83
84 Allows to use regexp to filter storage (with option C<--name>).
85
86 =item B<--regexp-insensitive>
87
88 Allows to use regexp non case-sensitive (with C<--regexp>).
89
90 =item B<--path-best-match>
91
92 Allows to select best path mount point (with C<--name>).
93
94 =item B<--reload-cache-time>
95
96 Time in minutes before reloading cache file (default: 180).
97
98 =item B<--oid-filter>
99
100 Choose OID used to filter storage (default: C<hrStorageDescr>) (values: C<hrStorageDescr>, C<hrFSMountPoint>).
101
102 =item B<--oid-display>
103
104 Choose OID used to display storage (default: C<hrStorageDescr>) (values: C<hrStorageDescr>, C<hrFSMountPoint>).
105
106 =item B<--display-transform-src> B<--display-transform-dst>
107
108 Modify the storage name displayed by using a regular expression.
109
110 Example: adding C<--display-transform-src='dev' --display-transform-dst='run'> will replace all occurrences of C<dev> with C<run>.
111
112 =item B<--show-cache>
113
114 Display cache storage data.
115
116 =item B<--space-reservation>
117
118 Some filesystem has space reserved (like ext4 for root).
119 The value is in percent of total (default: none) (results like 'df' command).
120
121 =item B<--filter-duplicate>
122
123 Filter duplicate storages (in used size and total size).
124
125 =item B<--filter-storage-type>
126
127 Filter storage types with a regexp (default: C<'^(hrStorageFixedDisk|hrStorageNetworkDisk|hrFSBerkeleyFFS|hrFSOther)$'>).
128 C<hrFSOther> is needed when the default file system is ZFS.
129
130 =back
131
132 =cut