Refactoring: Moved more storage check parameters from unsorted.py to dedicated module...
[check_mk.git] / checkman / zfsget
blob7b21ea35ceaa81b2477fdd9d4bab9691c7d9aa4b
1 title: Used space in ZFS pools and filesystems
2 agents: linux, solaris, freebsd
3 catalog: os/storage
4 license: GPL
5 distribution: check_mk
6 description:
7  This check monitors the usage of ZFS filesystems using the output
8  of the command {zfsget}. This is done in a separate check since
9  the output of {df} does not show the required metrics when ZFS
10  is used with quotas.
12  The check is fully compatible with {df} with respect to its configuration,
13  output and logic. Please refer to the manual of {df} for details.
15  ZFS has some specialities when compared with "normal" filesystems. From
16  the point of view of monitoring the crucial difference is that several
17  filesystems live together in a common "pool". Each of the filesystems
18  has its own amount of used space. But they share a common free space.
19  If you want to compute the {percentage} of used/free space of a filesystem,
20  you may run into trouble. Let's take the following example:
22  Lets say we have a pool P of the size 10GB where the filesystems A and B
23  live. Lets assume that A currently uses 2GB and B uses 7GB. That makes 1GB
24  left available in the pool. Reporting 20% usage for A would be misleading
25  in such a case, because you would assume 80% (i.e. 8GB) of free space. But
26  in fact just 1GB is left free for futher files. For that reason our {zfsget}
27  check reports the current usage plus the available pool space as total size
28  of the filesystem. In our example that means that the "size" of A is reported
29  as 3GB with 2GB used (which makes 66.6%). That way all filesystems will
30  become critical if the available pool space goes to zero.
32  Filesystems with a {quota} are handled differently, however. Here the quota
33  is reported as the total size. If A has a quota of 5GB, we report
34  2GB out of 5GB used.