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/watches/

silence

Example: the watch silence, a value at zero too long; connections to port 443 by SSH.

  • example
  • watch
  • silence
  • connections
  • ssh

par banshee1 installation1 version

v1Dernière

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

Keen 1.0.0 · 12 lignes
// The watch "silence": it raises when a value stayed at zero for too long.
// The collector counts the connections open to the port 443 of a Linux, by SSH: none for hours means
// that nobody reaches the site any more.
need('protocol:ssh');

output('connections', 'number', array('label' => 'Connections open to port 443'));

watch.silence('unused', 'Nobody connects', 'connections', array('warning' => '1 h', 'critical' => '6 h'));

// ss -H prints no header line: one line per connection established to the local port 443.
$read = ssh.run("ss -H -t state established '( sport = :443 )'");
value('connections', list.count(text.lines($read['output'])));