Examples
banshee/examples-collection/examples/mechanics/
variables
Example: variable() in its five forms, required, optional and with a default; words in a web page.
by banshee1 installation1 version
Published on October 27, 2026. First version in this collection.
Variables of a collector
variable() declares a setting of the collector, that the administrator gives on the probe. Here, a web page and the words it must hold, in the five forms.
How to read it
variable('example:page:url', 'text', array('label' => …, 'help' => …)): a name of 2 to 8 parts separated by:, a form, a label and a help sentence, both required. The familieshost,acl,protocolandprobeare banshee's.- The five forms:
text(one line),multiline(several, read here withtext.lines),integer(a number),boolean(true or false) andchoice(one ofchoices). - Required unless
'required' => false: a required variable left empty stops the collector, misconfigured. An optional one reads''. 'default' => …: the value of a new probe, until the administrator changes it.'secret' => truemakes it a secret, never written in a value or a message, and never given a default (seeexamples/api/signed-request).- A variable of a collector is set on its probe only: two collectors may use the same name without meeting.
To adapt it
- What belongs to the connection (an address, a port, an account, a TLS setting) is a standard variable of the tree, by
need, not a variable of the collector.