title: NetApp Filers: Used Space in Filesystems
agents: snmp
catalog: hw/storagehw/netapp
license: GPL
distribution: check_mk
description:
 This check measures the usage of aggregates and volumes in a NetAPP filer.
 The usage is checked against a warning and a critical level.
 If a snapshot reserve is configured, snapshot growth will affect
 the volume usage just like normal data.
 Snapshots will also be listed, if their size is non-zero.

 As of version {1.1.9i9} Check_MK supports {trends}. This means that
 the {df} check is now able to compute the {change} of the used space
 over the time and can make a forecast into the future. It can estimate
 the point of time where the filesystem will be full.

 In the default configuration the check will compute the trend based on the
 data of the last 24 hours. Similar like the CPU load this is done with
 a logarithmic average that weights the more recent time more than time
 farer away. Also data beyond the 24 hours will to some small degree be
 reflected in the computation. The advantage of this algorithm is a more
 precise prediction and a simpler implementation, which does not need any
 access to any RRDs or similar storage.

 Please note, that when a volume is started being monitored, then
 the trend of the past is unknown and will be assumed to be {zero}. That means
 that it will take at least one trend range of time until the trend approximately
 reflects the reality.

item:
 The name of the aggregate or volume on the NetAPP filer.

examples:
 # Set default levels for all volume to 90/95 (simple way)
 filesystem_default_levels = (90, 95)

 # alternative: Set default levels via new dictionary method:
 filesystem_default_levels = {
    "levels"         : (80, 90),  # levels in percent
    "magic"          : 0.8,       # magic factor
    "magic_normsize" : 20,        # normsize in GB
    "levels_low"     : (50, 60),  # magic never lowers levels below this (percent)
    "trend_range"    : 48,        # hours
    "trend_mb"       : (10, 20),  # MB of change during trend_range
    "trend_perc"     : (1, 2),    # Percent change during trend_range
    "trend_timeleft" : (72, 48),  # run time left in hours until full
    "trend_perfdata" : False      # no performance data for trends
 }

 # alternative[2]: Just change the default partially
 filesystem_default_levels["magic"] = 0.8

 # Make df output trend performance data (beware of exsting RRDs)
 filesystem_default_levels["trend_perfdata"] = True


 # Override warning/critical levels for all checks where
 # levels are "filesystem_default_levels"
 check_parameters = [
    # Hosts with tag "vms" get 85/95
    ( (85, 95), ["vms"], ALL_HOSTS, [ "fs_" ] ),
    # all /sapdata partitions will never be critical
    ( (101, 101), ALL_HOSTS, [ "fs_/sapdata$" ] ),
    # Partitions below "/var" get 80/90 with magic factor 0.5
    ( (80, 90, 0.5), ALL_HOSTS, [ "fs_/var" ] ),
    # /usr and /opt on hosts zlnx01 and zlnx02
    ( (98, 99), [ "zlnx01", "zlnx02" ], [ "fs_/usr$", "fs_/opt$" ] ),
    # All filesystems on clusters get 80/95
    ( (80, 95), CLUSTER_HOSTS, [ "fs_" ] ),
    # Complex parameters in dictionary form
    ( {"levels":(80,90), "trend_range":48, "trend_mb":(20,40)},
      [ "windows" ], ALL_HOSTS, [ "fs_" ]),
 ]

 # Exclude temporary backup from inventory
 inventory_df_exclude_mountpoints = [ "/mnt/backup" ]

 # Exclude certain filesystems from being inventorized at all (does not apply here)
 inventory_df_exclude_fs = [ "iso9660", "romfs" ]

perfdata:
 One or three values: The first value is the used space of the filesystem
 in MB. Also the minimum (0 MB), maximum (size of the filesystem) and the warning and critical
 levels in MB are provided. If you set the parameter {"trend_perfdata" : True}, then
 two additional values are output: the change of the usage in MB per range
 since the last check (e.g. in MB per 24 hours) and the averaged change (so called trend),
 also in MB per range. This can done globally in {main.mk} by {filesystem_default_levels["trend_perfdata"] = True}.

 Please note, that - until you use the storage type {MULTIPLE} in PNP4Nagios -
 changing the parameter {"trend_perfdata"} will stop all updates to
 your existing filesystem RRDs. You need either to delete or convert your RRDs
 if you want to change.

inventory:
 df supports inventory. All filesystem the agent reports
 will be inventorized except mount points listed in
 {inventory_df_exclude_mountpoints} and filesystem types
 listed in {inventory_df_exclude_fs}. The Windows agent
 only reports fixed disks. The Linux agent reports filesystems
 that have a size and are not of type smbfs, tmpfs, cifs or nfs.

[parameters]
parameters (dict): This check supports two types of parameters. The
 new version supports trends and is a dictionary with the following
 keys:

 {"levels"}: Warning and critical level of volume usage in percentages
 of the volume size. The default is {(80, 90)}.

 {"magic"}: The magic number, which scales the levels according to the
 volume size. Default
 is a factor of 1.0, which does no adaptation. A factor less than 1.0 raises
 the levels for large volume and lowers them for small ones. Please
 look at online documentation for more details about the magic factor.

 {"magic_normsize"}: Norm size of a volume for the magic computation.
 The default for this is {20}. It is measured in {GB}.

 {"levels_low"}: When applying the magic factor the warn/crit levels
 will never drop below these numbers. The is preset to {(50,60)}.

 {"trend_range"}: The time range over that trends are computed. This
 is in hours and preset to {24} (i.e. one day). If you set this to
 {None} then trend computing is disabled and the check outputs only
 one performance data value.

 {"trend_mb"}: A pair of numbers specifying the maximum number of
 megabytes the usage is allowed to grow within the time range if not
 triggering warning/critical. If you set this to {(10,20)} then
 the check will warn if the size grows by more than 10 MB per {trend_range}
 hours and critical if it grows more than 20 MB. Per default no levels
 are applied.

 {"trend_perc"}: This is similar to trend_mb but here you specify
 the allowed growth in percentages of the volume size. Fractional
 values are allowed. This may be used in parallel with trend_mb.

 {"trend_timeleft"}: A pair of numbers that specifies the minimum
 hours of time left until the volume gets full. If you set this
 to {(48,24)} then the check will warn if the estimated time until
 the disk is full is 48 hours or less. It will get critical if only
 24 hours are assumed to be left.

 {"trend_perfdata"}: If this is set to {True}, then the check will
 output two further performance data values: the current growth
 and the trend.

 It is still possible to specify a pair or triple of numbers
 {instead} of a dictionary:

warning (int): The percentage of used space that triggers
 WARNING state
critical (int): The percentage of used space that triggers
 CRITICAL space
magic_factor (float): Optional: Magic factor that adapts the levels
 according to the size of the volume. Default
 is a factor of 1.0, which does no adaptation. A factor
 less than 1.0 raises the levels for large volumes
 and lowers them for small ones. Please look at online
 documentation for more details about the magic factor.

[configuration]
inventory_df_exclude_fs (list of strings): This has no effect on NetAPP filers.
inventory_df_exclude_mountpoints (list of strings): List of mount points to exclude from inventory
filesystem_default_levels: Default levels for volumes detected by inventory.
 This variable is preset to {{ "levels" : (80, 90), "magic_normsize"  : 20,
 "levels_low" : (50, 60), "trend_range" : 24 }}
