banshee est en développement actif : les collecteurs vont encore changer, et une version que vous publiez demandera sans doute des ajustements. Pour un usage stable, attendez la version 1.0.0.

Examples

banshee/examples-collection/examples/mechanics/

fail

Example: fail and its three states, critical, misconfigured, unreachable; software RAID by SSH.

  • example
  • fail
  • states
  • raid
  • ssh

par banshee1 installation1 version

v1Dernière

Publiée le 27 octobre 2026. First version in this collection.

Stopping on a state: fail

fail stops the collector on a state it alone knows, with a summary and a detail. Here, the software RAID of a Linux: no RAID, an empty answer, a lost disk.

How to read it

  • fail('critical', 'A RAID array lost a disk', $mdstat['output']): the state, the summary, and an optional detail. Three states: - critical: the target is in trouble; - misconfigured: the probe is set wrong, here a host without software RAID; - unreachable: the target cannot be read.
  • A stopped collector returns nothing, not even the values returned before the stop, and no watch is judged: the state of the probe is the one of fail.
  • text.match($mdstat['output'], '[U*_[U_]*]') finds [U_] or [_UU]; list.count of the match is 0 when nothing matches.

To adapt it

  • fail is for what the code alone knows. A threshold the administrator should set is a watch: here, the rebuilding of an array is a watch.state, that can be unchecked.
  • A secret is never written in a summary or a detail: the validation refuses it.