anchor.diff:  
   ==== Configuration and Usage
   
  -.Monitor specific parameters for the BSFMonitor
  +.Monitor specific parameters for the _BSFMonitor_
   [options="header, autowidth"]
   |===
  -| Parameter         | Description                                             | Required | Default value
  -| `file-name`       | Path to the script file.                                | required | `-`
  -| `bsf-engine`      | The BSF Engine to run the script in, like: +
  -                      `Bean Shell` - `bsh.util.BeanShellBSFEngine` +
  -                      `Groovy` - `org.codehaus.groovy.bsf.GroovyEngine`  +
  -                      `Jython` - `org.apache.bsf.engines.jython.JythonEngine` | required | `-`
  -| `run-type`        | one of `eval` or `exec`                                 | optional | `eval`
  -| `lang-class`      | The BSF language class, like `groovy` or `beanshell`.   | optional | `file-name extention is interpreted by default`
  -| `file-extensions` | comma separated list                                    | optional | `-`
  -|===
  -
  +| Parameter         | Description                                                    | Required | Default value
  +| `file-name`       | Path to the script file.                                       | required | `-`
  +| `bsf-engine`      | The BSF Engine to run the script in different languages like + 
  +                      _Bean Shell_: `bsh.util.BeanShellBSFEngine` +
  +                      _Groovy_: `org.codehaus.groovy.bsf.GroovyEngine`  +
  +                      _Jython_: `org.apache.bsf.engines.jython.JythonEngine`         | required | `-`
  +| `run-type`        | one of `eval` or `exec`                                        | optional | `eval`
  +| `lang-class`      | The BSF language class, like `groovy` or `beanshell`.          | optional | file-name extension is interpreted by default
  +| `file-extensions` | comma-separated list                                           | optional | `-`
  +|===
   
   .Beans which can be used in the script
   [options="header, autowidth"]
   |===
  -| Variable     | Type                           | Description
  -| `map`        | Map<String, Object>            | The _map_ contains all various parameters passed to the monitor
  +| Variable      | Type                          | Description
  +| `map`         | Map<String, Object>           | The _map_ contains all various parameters passed to the monitor
                                                     from the service definition it the 'poller-configuration.xml' file.
  -| `ip_addr`    | String                         | The IP address that is currently being polled.
  -| `node_id`    | int                            | The Node ID of the node the _ip_addr_ belongs to.
  -| `node_label` | String                         | The Node Label of the node the _ip_addr_ and service belongs to.
  -| `svc_name`   | String                         | The name of the service that is being polled.
  -| `bsf_monitor`| BSFMonitor                     | The instance of the _BSFMonitor_ object calling the script. 
  -                                                  Useful for logging via its 
  -                                                  +log(String sev, String fmt, Object... args)+ method.
  -| `results`    | HashMap<String, String>        | The script is expected to put its results into this object.
  -                                                  The status indication sould be set into the entry with key _status_.
  -                                                  If the status is not _OK_, a key _reason_ should contain a description of the problem.
  -| `times`      | LinkedHashMap<String, Number>  | The script is expected to put one or more response times into this object.
  -|===
  -
  -Additionally every parameter added to to service definition in 'poller-configuration.xml' is available as a _String_ object in the script.
  -The key attribute of the parameter respresents the name of the _String_ object and the value attribute represents the value of the _String_ object.
  +| `ip_addr`     | String                        | The IP address that is currently being polled.
  +| `node_id`     | int                           | The Node ID of the node the `ip_addr` belongs to.
  +| `node_label`  | String                        | The Node Label of the node the `ip_addr` and service belongs to.
  +| `svc_name`    | String                        | The name of the service that is being polled.
  +| `bsf_monitor` | _BSFMonitor_                    | The instance of the _BSFMonitor_ object calling the script. 
  +                                                  Useful for logging via its +log(String sev, String fmt, Object... args)+ method.
  +| `results`     | HashMap<String, String>       | The script is expected to put its results into this object.
  +                                                  The status indication should be set into the entry with key `status`.
  +                                                  If the status is not `OK`, a key `reason` should contain a description of the problem.
  +| `times`       | LinkedHashMap<String, Number> | The script is expected to put one or more response times into this object.
  +|===
  +
  +Additionally every parameter added to the service definition in 'poller-configuration.xml' is available as a _String_ object in the script.
  +The key attribute of the parameter represents the name of the _String_ object and the value attribute represents the value of the _String_ object.
   
   NOTE: Please keep in mind, that these parameters are also accessible via the _map_ bean.
   
  
positive.code: }
  ----
  
  
  ===== Minimal Groovy Example
  To use the Groovy language an additional library is required.
  Copy a compatible _groovy-all.jar_ into to opennms lib folder and restart OpenNMS.
  That makes Groovy available for the BSFMonitor.
  
  Groovy Example _poller-configuration.xml_ with default _run-type_ _eval_
  [source, xml]
  ----
  <service name="MinimalGroovy" interval="300000" user-defined="true" status="on">
  
negative.code: It is also possible to return one or many response times directly from the script.
  To add custom response times or override the default one, add entries to the _times_ object.
  The entries are keyed with a _String_ that names the datasource and have as values a number that represents the response time.
  To override the default response time datasource add an entry into `times` named `response-time`.
  
  ==== Timeout and Retry
  The _BSFMonitor_ does not perform any timeout or retry processing on its own.
  If retry and or timeout behaviour is required, it has to be implemented in the script itself.
  
  ==== Requirements for the script (run-types)
  Depending on the `run-type` the script has to provide its results in different ways.
  For minimal scripts with very simple logic `run-type` `eval` is the simple option.
  Scripts running in `eval` mode have to return a _String_ matching one of the `status codes`.
  
  If your script is more than a one-liner, `run-type` `exec` is essentially required.
  Scripts running in `exec` mode need not return anything, but they have to add a `status` entry with a `status code` to the _results_ object.
  Additionally, the _results_ object can also carry a "reason":"message" entry that is used in non `OK` states.
  
  ==== Commonly used language settings
  The _BSF_ supports many languages, the following table provides the required setup for commonly used languages.
  
  ._BSF_ language setups
  [options="header, autowidth"]
  |===
  | Language                            | lang-class  | bsf-engine                                    | required library 
  | http://www.beanshell.org[BeanShell] | _beanshell_ | `bsh.util.BeanShellBSFEngine`                 | supported by default
  | http://groovy.codehaus.org[Groovy]  | _groovy_    | `org.codehaus.groovy.bsf.GroovyEngine`        | +groovy-all-[version].jar+
  | http://www.jython.org[Jython]       | _jython_    | `org.apache.bsf.engines.jython.JythonEngine`  | +jython-[version].jar+
  |===
  
  ==== Minimal Examples
  
  ===== Minimal Bean Shell Example
  ._BeanShell_ example 'poller-configuration.xml'
  [source, xml]
  ----
  <service name="MinimalBeanShell" interval="300000" user-defined="true" status="on">
  