banshee is under active development: collectors will keep changing, and a version you publish will likely need adjustments. For stable use, wait for version 1.0.0.

Linux

banshee/linux-collection/linux/ssh/

filesystems

Space, inodes and read-only state of each mounted filesystem of a Linux by SSH.

  • linux
  • ssh
  • disk
  • filesystem
  • inodes
  • alpine
  • debian
  • fedora

by banshee1 installation3 versions

Filesystems of a Linux, by SSH

Returns, for each mounted filesystem, the used space, the free space, the size, the used and free inodes, whether it is mounted read-only, and whether the account could read it. Memory and pseudo filesystems are left out. Seven watches are offered, each one set on the probe.

Versions

Generic: /proc/mounts is written by the kernel the same way on Alpine, Debian and Fedora; -P, -k and -i are options of df in BusyBox as in GNU coreutils. A df that does not know -i (a BusyBox built without it) stops the collector misconfigured.

How it works

The collector runs three commands:

  1. cat /proc/mounts, for the type and the mode (rw or ro) of each mount;
  2. df -P -k, for the space, in KiB;
  3. df -P -i, for the inodes.
  • A mount point shown twice (stacked mounts) is judged once. A filesystem of size zero (proc, sysfs, cgroup…) is left out, as are the types tmpfs, devtmpfs, ramfs, overlay, squashfs, iso9660, udf, efivarfs, fuse.lxcfs, fuse.gvfsd-fuse and fuse.portal (the last two, views a desktop session mounts for its user alone).
  • A mount the account may not read (the network or FUSE mount of another user, a mount point without the right to enter it) is named by df on its error output (df: /mnt/x: Permission denied). It is returned with its mode and access at unreadable, and nothing else: no space, no inodes. A readable filesystem has access at readable.
  • The used share is the one df shows: used over used plus available, root's reserve excluded. The free space is the space available to an ordinary account.
  • An ext4 that meets an error remounts itself read-only: the mount mode is read for that.
  • A filesystem that does not count inodes (btrfs, vfat) has no inode values: a filesystem can be full with free space left, when its inodes run out.
  • Nothing is written on the target.

Prerequisites

  • an SSH account for monitoring, without write rights;
  • the fingerprint of the server's host key, set in protocol:ssh:fingerprint (not needed when the Security settings trust the first SSH fingerprint presented).

Outputs

NameLabelUnitPer instance
used-percentUsed space%yes, per filesystem (its mount point)
usedUsed spaceGiByes, per filesystem
freeFree spaceGiByes, per filesystem
sizeSizeGiByes, per filesystem
inodes-usedUsed inodes%yes, per filesystem
inodes-freeFree inodes—yes, per filesystem
modeMount mode: rw or ro—yes, per filesystem
accessAccess: readable, or unreadable when the account may not read it—yes, per filesystem

Watches

NameTitleKindDefaultsChecked by default
usedUsed spaceabove a threshold, on used-percentwarning above 80 %, critical above 90 %yes
full-soonFull within a weekabove a threshold, on used-percentwarning above 99 %, ahead 7 dyes
freeLittle free spacebelow a threshold, on freecritical below 5 GiB; no warningno
inodesInodes running outabove a threshold, on inodes-usedwarning above 80 %, critical above 90 %yes
read-onlyMounted read-onlystate, on modecritical on royes
unreadableFilesystem unreadablestate, on accesswarning on unreadableyes
missingFilesystem missingexpected instances, on used-percentno filesystem named: it raises nothing until names are set on the probeno

Limits

  • A stale network mount can make df hang: the run then ends on the SSH timeout, unreachable.
  • In a mount point, a run of blanks is read as a single one.
  • A filesystem mounted read-only on purpose raises read-only: uncheck it, or leave it out of the selection. Likewise a mount the account is not meant to read raises unreadable: leave it out of the selection.
  • A mount is told unreadable from the line df writes for it (df: <point>: <reason>, the point between quotes or not): a df that writes it otherwise leaves the mount out.