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, and whether it is mounted read-only. Memory and pseudo filesystems are left out. Six watches are offered, each one set on the probe.

What changed since version 1

  • Inodes are measured: a filesystem can be full with free space left, when its inodes run out.
  • The mount mode is read: an ext4 that meets an error remounts itself read-only, and read-only raises a critical.
  • The used space is the one df shows, used over used plus available, root's reserve excluded; version 1 divided by the whole size, which stayed about 5 % under on ext4.
  • Filesystems are left out by their type (from /proc/mounts), no longer by their device name: a tmpfs named run or shm is left out too, as are overlay, squashfs (snaps) and CD images.
  • A mount point holding blanks is supported, and a mount point shown twice is judged once.
  • A df that cannot read one mount (and exits with an error) no longer stops the collector: the other filesystems are still measured. Reading no filesystem at all stops it misconfigured.
  • size is new. used, full-soon, free and missing keep their ids, kinds and defaults: a probe upgraded from version 1 keeps its settings.

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 and fuse.gvfsd-fuse.
  • A filesystem that does not count inodes (btrfs, vfat) has no inode values.
  • Portable: /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. 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

OutputUnitPerMeaning
used%filesystem (its mount point)used space
freeMiBfilesystemspace available
sizeGiBfilesystemsize
inodes-used%filesystemused inodes
inodes-free—filesystemfree inodes
mode—filesystemrw or ro

Watches

WatchKindDefaultsChecked
used Used spaceabove, on usedwarning 80, critical 90yes
full-soon Full within a weekabove, on usedwarning 99, trend 7 dyes
free Little free spacebelow, on freecritical 1024no
inodes Inodes running outabove, on inodes-usedwarning 80, critical 90yes
read-only Mounted read-onlystate, on modecritical royes
missing Filesystem missingmissing, on usedno expected nameyes, raises once names are set

Limits

  • A df that does not know -i (a BusyBox built without it) stops the collector misconfigured.
  • 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.