Examples
banshee/examples-collection/examples/mechanics/
selection-only
Example: per with only, a default selection of named elements; systemd services by SSH.
par banshee1 installation2 versions
Selection: per and only
'only' => array('sshd', 'cron') makes the default selection "only these elements": of all the systemd services of a Linux, two are watched by default.
How to read it
- The collector still returns every service it sees: the poller keeps only those the selection names. The administrator adds others on the probe, by name or by pattern (
nginx*). ignoreandonlynever go together.text.match($line, '([^ ]+).service +[^ ]+ +([^ ]+)'): the name of the service in the first group, its active state in the second. A line that does not match is skipped.watch.expectraises on any state butactive.
To adapt it
- On a distribution where SSH runs as
ssh, writesshin the list, or a patternssh*.