Skip to content

Commit

Permalink
Merge pull request #265 from indigo423/NMS-7655-Documentation-fixes-t…
Browse files Browse the repository at this point in the history
…o-normalizing-italic-and-monospace-fonts

NMS-7655: Documentation fixes to normalize italic and monospace fonts
  • Loading branch information
indigo423 committed May 10, 2015
2 parents c55b3ee + ed0a8d4 commit 8762781
Show file tree
Hide file tree
Showing 29 changed files with 211 additions and 176 deletions.
58 changes: 29 additions & 29 deletions opennms-doc/guide-admin/src/asciidoc/text/poller/BSFMonitor.adoc
Expand Up @@ -38,22 +38,22 @@ _BSFMonitor_ also grants access to a selection of _OpenNMS_ internal methods and
.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
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.
| 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 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.
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.
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.
Expand All @@ -69,18 +69,18 @@ The following status codes are defined:
[options="header, autowidth"]
|===
| Code | Description
| `OK` | Service is available
| `UNK` | Service status unknown
| `UNR` | Service is unresponsive
| `NOK` | Service is unavailable
| _OK_ | Service is available
| _UNK_ | Service status unknown
| _UNR_ | Service is unresponsive
| _NOK_ | Service is unavailable
|===

===== Response time tracking

By default the _BSFMonitor_ tracks the whole time the script file consumes as the response time.
If the response time should be persisted the response time add the following parameters:

.RRD response time tracking for this service in 'poller-configuration.xml'
.RRD response time tracking for this service in `poller-configuration.xml`
[source, xml]
----
<!-- where in the filesystem response times are stored -->
Expand Down Expand Up @@ -129,7 +129,7 @@ The _BSF_ supports many languages, the following table provides the required set

===== Example Bean Shell

._BeanShell_ example 'poller-configuration.xml'
._BeanShell_ example `poller-configuration.xml`
[source, xml]
----
<service name="MinimalBeanShell" interval="300000" user-defined="true" status="on">
Expand All @@ -140,7 +140,7 @@ The _BSF_ supports many languages, the following table provides the required set
<monitor service="MinimalBeanShell" class-name="org.opennms.netmgt.poller.monitors.BSFMonitor" />
----

.BeanShell example 'MinimalBeanShell.bsh' script file
.BeanShell example `MinimalBeanShell.bsh` script file
[source, java]
----
bsf_monitor.log("ERROR", "Starting MinimalBeanShell.bsf", null);
Expand All @@ -156,10 +156,10 @@ if (testFile.exists()) {
===== Example Groovy

To use the Groovy language an additional library is required.
Copy a compatible +groovy-all.jar+ into to 'opennms/lib' folder and restart _OpenNMS_.
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` set to `eval`
._Groovy_ example `poller-configuration.xml` with default `run-type` set to `eval`
[source, xml]
----
<service name="MinimalGroovy" interval="300000" user-defined="true" status="on">
Expand All @@ -170,7 +170,7 @@ That makes _Groovy_ available for the _BSFMonitor_.
<monitor service="MinimalGroovy" class-name="org.opennms.netmgt.poller.monitors.BSFMonitor" />
----

._Groovy_ example 'MinimalGroovy.groovy' script file for `run-type` `eval`
._Groovy_ example `MinimalGroovy.groovy` script file for `run-type` `eval`
[source, java]
----
bsf_monitor.log("ERROR", "Starting MinimalGroovy.groovy", null);
Expand All @@ -183,7 +183,7 @@ if (testFile.exists()) {
}
----

.Groovy example 'poller-configuration.xml' with `run-type` set to `exec`
.Groovy example `poller-configuration.xml` with `run-type` set to `exec`
[source, xml]
----
<service name="MinimalGroovy" interval="300000" user-defined="true" status="on">
Expand All @@ -195,7 +195,7 @@ if (testFile.exists()) {
<monitor service="MinimalGroovy" class-name="org.opennms.netmgt.poller.monitors.BSFMonitor" />
----

._Groovy_ example 'MinimalGroovy.groovy' script file for `run-type` set to `exec`
._Groovy_ example `MinimalGroovy.groovy` script file for `run-type` set to `exec`
[source, java]
----
bsf_monitor.log("ERROR", "Starting MinimalGroovy", null);
Expand All @@ -211,10 +211,10 @@ if (testFile.exists()) {
===== Example Jython

To use the _Jython_ (_Java_ implementation of _Python_) language an additional library is required.
Copy a compatible `jython-x.y.z.jar` into the 'opennms/lib' folder and restart _OpenNMS_.
Copy a compatible `jython-x.y.z.jar` into the `opennms/lib` folder and restart _OpenNMS_.
That makes _Jython_ available for the _BSFMonitor_.

.Jython example 'poller-configuration.xml' with `run-type` `exec`
.Jython example `poller-configuration.xml` with `run-type` `exec`
[source, xml]
----
<service name="MinimalJython" interval="300000" user-defined="true" status="on">
Expand All @@ -226,7 +226,7 @@ That makes _Jython_ available for the _BSFMonitor_.
<monitor service="MinimalJython" class-name="org.opennms.netmgt.poller.monitors.BSFMonitor" />
----

._Jython_ example 'MinimalJython.py' script file for `run-type` set to `exec`
._Jython_ example `MinimalJython.py` script file for `run-type` set to `exec`
[source, python]
----
from java.io import File
Expand All @@ -247,7 +247,7 @@ NOTE: As profit that this is really _Python_, notice the substitution of _Python

The following example references all beans that are exposed to the script, including a custom parameter.

._Groovy_ example 'poller-configuration.xml'
._Groovy_ example `poller-configuration.xml`
[source, xml]
----
<service name="MinimalGroovy" interval="30000" user-defined="true" status="on">
Expand Down
Expand Up @@ -33,9 +33,9 @@ If the _RTT_LATEST_OPERSENSE_ returns with _overThreshold(3)_ the service is mar
|===
| Parameter | Description | Required | Default value
| `retry` | Number of retries to get the information from the SNMP agent before the service is marked as
_down_. | optional | from 'snmp-config.xml'
| `timeout` | Time in milliseconds to wait for the result from the SNMP agent before making the next attempt. | optional | from 'snmp-config.xml'
| `admin-tag` | The `tag` attribute from your IP SLA configuration you want to monitor. | required | `-`
_down_. | optional | from `snmp-config.xml`
| `timeout` | Time in milliseconds to wait for the result from the SNMP agent before making the next attempt. | optional | from `snmp-config.xml`
| `admin-tag` | The `tag` attribute from your _IP SLA_ configuration you want to monitor. | required | `-`
| `ignore-thresh` | Boolean indicates if just the status or configured threshold should be monitored. | required | ``
|===

Expand Down Expand Up @@ -78,7 +78,7 @@ WARNING: It´s not possible to reconfigure an IP SLA entry.
If you want to change parameters, you have to delete the whole configuration and reconfigure it with your new parameters.
Backup your Cisco configuration manually or take a look at http://www.shrubbery.net/rancid/[RANCID].

To monitor both of the entries the configuration in 'poller-configuration.xml' requires two service definition entries:
To monitor both of the entries the configuration in `poller-configuration.xml` requires two service definition entries:

[source, xml]
----
Expand Down
Expand Up @@ -39,7 +39,7 @@ The `packet-count` and `packet-timeout` parameters instead service this purpose
* One or more _Cisco_ devices running an _IOS_ image of recent vintage; any 12.2 or later image is probably fine.
Even very low-end devices appear to support the CISCO-PING-MIB.
* The _IOS_ devices that will perform the remote pings must be configured with an _SNMP write community_ string whose source address access-list includes the address of the OpenNMS server and whose MIB view (if any) includes the OID of the _ciscoPingTable_.
* The corresponding _SNMP write community_ string must be specified in the `write-community` attribute of either the top-level `<snmp-config>` element of 'snmp-config.xml' or a `<definition>` child element that applies to the _SNMP-primary_ interface of the _IOS_ device(s) that will perform the remote pings.
* The corresponding _SNMP write community_ string must be specified in the `write-community` attribute of either the top-level `<snmp-config>` element of `snmp-config.xml` or a `<definition>` child element that applies to the _SNMP-primary_ interface of the _IOS_ device(s) that will perform the remote pings.

===== Scalability concerns

Expand Down Expand Up @@ -68,11 +68,11 @@ _IOS_ seems to clean up entries in this table within a manner of minutes after t
|===
| Parameter | Description | Required | Default value
| `timeout` | A timeout, in milliseconds, that should override the SNMP timeout specified in
'snmp-config.xml'. Do not use without a very good reason to do so. | optional | from 'snmp-config.xml'
`snmp-config.xml`. Do not use without a very good reason to do so. | optional | from `snmp-config.xml`
| `retry` | Number of retries to attempt if the initial attempt times out. Overrides the
equivalent value from 'snmp-config.xml'. Do not use unless really needed. | optional | from 'snmp-config.xml'
equivalent value from `snmp-config.xml`. Do not use unless really needed. | optional | from `snmp-config.xml`
| `version` | SNMP protocol version (1, 2c, or 3) to use for operations performed by this service
monitor. Do not use with out a very good reason to do so. | optional | from 'snmp-config.xml'
monitor. Do not use with out a very good reason to do so. | optional | from `snmp-config.xml`
| `packet-count` | Number of ping packets that the remote _IOS_ device should send. | optional | `5`
| `packet-size` | Size, in bytes, of each ping packet that the remote _IOS_ device should send. | optional | `100`
| `packet-timeout` | Timeout, in milliseconds, of each ping packet sent by the remote _IOS_ device. | optional | `2000`
Expand Down Expand Up @@ -170,7 +170,7 @@ Some or all of the Bar Limited CPE routers may be non-Cisco devices in this scen
To meet this requirement, our approach is to configure Bar Limited's premise routers to be in the surveillance categories Customer_Bar, CPE, and Routers, and to use a filter to create a poller package that applies only to those routers.
This time, though, we will use the special value `${ipaddr}` not in the `proxy-ip-addr` parameter but in the `target-ip-addr` parameter so that the remote pings will be performed for each Bar CPE router.
Since we want the same _IOS_ device 20.11.5.11 to ping the CPE routers, we statically list that value for the `proxy-ip-addr` address.
Example 'poller-configuration.xml' additions
Example `poller-configuration.xml` additions

[source, xml]
----
Expand Down
@@ -1,7 +1,7 @@

==== CitrixMonitor

This monitor is used to test if a Citrix(R) Server or XenApp Server(R) is providing the ICA protocol on TCP 1494.
This monitor is used to test if a Citrix(R) Server or XenApp Server(R) is providing the _Independent Computing Architecture_ (_ICA_) protocol on TCP 1494.
The monitor opens a TCP socket and tests the greeting banner returns with `ICA`, otherwise the service is unavailable.

===== Monitor facts
Expand All @@ -17,19 +17,19 @@ The monitor opens a TCP socket and tests the greeting banner returns with `ICA`,
.Monitor specific parameters for the CitrixMonitor
[options="header, autowidth"]
|===
| Parameter | Description | Required | Default value
| `retry` | Amount of attempts opening a connection and try to get the greeting banner before the service goes down | optional | `0`
| `timeout` | Time to wait retrieving the greeting banner `ICA` from TCP connectiona before trying a next attempt. | optional | `3000 ms`
| `port` | TCP port where ICA is listening. | optional | `1494`
| Parameter | Description | Required | Default value
| `retry` | Amount of attempts opening a connection and try to get the greeting banner before the service goes down | optional | `0`
| `timeout` | Time to wait retrieving the greeting banner `ICA` from TCP connection before trying a next attempt. | optional | `3000 ms`
| `port` | TCP port where the _ICA_ protocol is listening. | optional | `1494`
|===

WARNING: If you have configure the _Metaframe Presentation Server Client_ using _Session Reliability_, the TCP port is `2598` instead of `1494`.
WARNING: If you have configure the _Metaframe Presentation Server Client_ using _Session Reliability_, the TCP port is 2598 instead of 1494.
You can find additional information on http://support.citrix.com/article/CTX104147[CTX104147].
It is not verified if the monitor works in this case.

===== Examples

The following example configures OpenNMS to monitor the ICA protocol on TCP `1494` with 2 retries and waiting 5 seconds for each retry.
The following example configures OpenNMS to monitor the ICA protocol on TCP 1494 with 2 retries and waiting 5 seconds for each retry.
[source, xml]
----
<service name="Citrix-TCP-ICA" interval="300000" user-defined="false" status="on">
Expand Down

0 comments on commit 8762781

Please sign in to comment.