Configuring the Netcool OMNIbus adapter

You configure an adapter in Grid Manager. The configuration provides information about how the adapter interacts with the IBM Tivoli Netcool/OMNIbus application. While each adapter must have a unique name, you can create multiple adapters with the same adapter type to allow for different configuration properties.


The form view provides an easy-to-use interface for configuring adapters. The form view prevents human errors that might occur as a result of copying the configuration XML from the XML sample into the UI when configuring an adapter. You can switch to the XML view to configure those elements and attributes that are not available as fields on the form view or to configure all the elements and attributes using XML only. However, after you switch to the XML view and save the configuration in the XML from that view, you cannot thereafter use the form view for modifying that configuration.

Note

The adapter for Tivoli Netcool/OMNIbus contains an actor adapter and a monitor adapter. The default name for the actor adapter is OMNIbusAdapter.

Tivoli Netcool/OMNIbus actor adapter configuration

There are two methods available to define the URL for the Tivoli Netcool/OMNIbus database query. You can define the target, port, subprotocol, database, and any desired parameters as elements in the adapter configuration. With this method, TrueSight Orchestration will create the URL. Alternately, you can define the complete URL, including parameters, in a single element, <url>, in the adapter configuration.

The following samples depict two ways to define the same URL.

XML samples to define the URL for the Tivoli Netcool/OMNIbus database query

<url>jdbc:oracle:thin:@target1:port1:database1?param1=abc&param2=xyz</url>
<target>target1</target>
<port>port1</port>
<subprotocol>sybase:Tds</subprotocol>
<database>database1</database>
<parameters>
 <param1>abc</param1>
 <param2>xyz</param2>
</parameters>

Note

These samples are excerpts from the Tivoli Netcool/OMNIbus adapter configuration, which supports the elements that are required for the complete configuration. You must provide the details of the database (such as Sybase or Oracle) to which the Tivoli Netcool/OMNIbus application listens, when you configure the adapter.

To configure the actor adapter, monitor adapter, or both

  1. Log on to the TrueSight Orchestration Grid Manager.
  2. Access the adapters page by clicking the Manage tab; then click the Adapters tab.
  3. In the Adapters in Repositorylist:
    • Select the ro-adapter-omnibus-actor check box to configure the actor adapter
    • Select the ro-adapter-omnibus-monitor check box to configure the monitor adapter.
    • Select both check boxes to configure both adapters.
  4. Click Add to Grid to include the adapter in the Adapters on Grid list.
  5. Click Configure corresponding to the newly added adapter.
  6. On the Add an Adapter Configurationpage, perform the following substeps to configure the adapter using the form view or jump to step 7 to configure the adapter using the XML view:
    1. Enter a name for the adapter.
    2. Enter a description for the adapter.
    3. Under Properties, enter or select values for the configuration elements.

      The configuration elements for each adapter are described in that adapter's section. Include all required elements indicated with an asterisk (*).

      Note

      Switching to the XML view to specify those elements and attributes not included in the form means that you cannot thereafter use the form for modifying that configuration.

  7. (optional) Configure the adapter in the XML view using the following substeps:
    1. Enter a name and a description for the adapter.
    2. Click Switch to XML View.
    3. On the*Warning* message that appears, click Switch View.
    4. Copy the configuration elements from the XML sample into the Properties text box, and then click OK.

      Note

      If the default value for an optional element is acceptable, omit the element. Do not include empty elements.

    5. On the Warning message that appears, click Save.

      This saves the adapter configuration with settings in the XML view permanently. The newly configured adapter is now listed in the Adapters on Grid list.

      The following table describes the node elements required to configure the actor adapter:


      Node elements required to configure the actor adapter

      UI label

      Element

      Definition

      Required

      URL

      <url>

      Specifies the complete connection URL for the target database

      In the absence of this element, use the <target>, <port>, <subprotocol>, <database>, and <parameters> elements (as required) so that TrueSight Orchestration can create the URL.

      No

      Target

      <target>

      Specifies the host name or IP address of the database server

      This element is required in the absence of the <url> element.

      Conditional; required if <url> is not specified

      Port

      <port>

      Specifies the port on which the database server listens

      Conditional; required if <url> is not specified

      User Name

      <user-name>

      Specifies the user name to use for database authentication

      Conditional; required if <url> is not specified

      Password

      <password>

      Specifies the password that corresponds with the <user-name> element provided

      Conditional; required if <url> is not specified

      Subprotocol

      <subprotocol>

      Specifies the driver-specified subprotocol that is used to build the connection URL

      The adapter prepends jdbc: to the value provided.

      Database type: subprotocol

      Sample values: sybase:Tds

      Conditional; required if <url> is not specified

      Statement Terminator

      <statement-terminator>

      Contains the termination value for the SQL statements

      No

      Database

      <database>

      Specifies the name of the database to which the adapter connects

      Conditional; required if <url> is not specified

      Driver

      <driver>

      Specifies the fully qualified JDBC driver class name

      Yes

      Max Wait

      <max-wait>

      Specifies the time, in milliseconds, to wait before timing out when establishing a connection to a database

      Default value: 60000 (1 minute)

      No

      Parameters

      <parameters>

      Specifies the JDBC connection parameters

      The elements contained in the <parameters> element represent key/value pairs that will be appended to the end of the JDBC URL that is created.

      Note: This element is not used when a <url> element is present. The URL must contain all required parameters.

      No

      Disable Connection Cache<disable-connection-cache>Specifies whether to enable or disable the connection caching in the connection pool When you specify true, a new connection is opened for each adapter request and closed after the request is complete. Valid values: true, false (default)No

A confirmation message is displayed on the Adapters page when the changes are saved. The following figure shows a non-URL XML sample to configure the actor adapter.

XML sample of a non-URL actor adapter configuration

 
<config>
   <target>dev5</target>
   <port>4100</port>
   <subprotocol>sybase:Tds</subprotocol>
   <userName>host</userName>
   <password>root</password>
   <database>DB</database>
   <driver>com.sybase.jdbc3.jdbc.SybDriver</driver>
   <parameters>
     <USE_METADATA>false</USE_METADATA>
     <LITERAL_PARAMS>true</LITERAL_PARAMS>
     <PROTOCOL_CAPTURE>/tmp/sybase.log</PROTOCOL_CAPTURE>
   </parameters>
</config>


The following figure shows an URL XML template to configure the actor adapter.

XML template of an URL actor adapter configuration

<config>
 <url></url>
 <user-name></user-name>
 <password></password>
 <statement-terminator></statement-terminator>
 <driver></driver>
 <max-wait></max-wait>
</config>


The following figure shows an URL XML sample to configure the actor adapter.

XML sample of an URL actor adapter configuration

<config>
 <url>
   <![CDATA[jdbc:sybase:Tds:dev5:4100?USE_METADATA=false&LITERAL_PARAMS=true]]>
 </url>
 <userName>host</userName>
 <password>root</password
 <database>DB</database>
 <driver>com.sybase.jdbc3.jdbc.SybDriver</driver>
 <parameters>
    <USE_METADATA>false</USE_METADATA>
    <LITERAL_PARAMS>true</LITERAL_PARAMS>
    <PROTOCOL_CAPTURE>/tmp/sybase.log</PROTOCOL_CAPTURE>
  </parameters>
</config>

The following figure shows an XML sample to configure the actor adapter by using the <disable-connection-cache> element.

XML sample to configure the actor adapter by using the <disable-connection-cache> element

<config>
  <target>XYZServerDB</target>
  <port>4100</port>
  <user-name>abc</user-name>
  <subprotocol>sybase:Tds</subprotocol>
  <database>NCOMS</database>
  <driver>com.sybase.jdbc3.jdbc.SybDriver</driver>
  <max-wait>60000</max-wait>
  <disable-connection-cache>true</disable-connection-cache>
</config>

The following table describes the node elements required to configure the monitor adapter.

Node elements required to configure the monitor adapter

UI label

Element

Definition

Required

URL

<url>

Specifies the complete connection URL for the target database

In the absence of this element, the <target>, <port>, <subprotocol>, <database>, and <parameters> elements must be provided (as required) so that TrueSight Orchestration can create the URL.

No

Targets

<targets>

Contains the <target> element

Yes

Target

<target>

Contains the SQL server, database, and connection information

This element must contain a name attribute that provides a target name and a default attribute that has a value of true.

Note: The monitor adapter supports a single target and multiple events.

Yes

Host

<host>

Specifies the host name or IP address of the database server

Conditional

Port

<port>

Specifies the port on which the database server listens

Conditional

User Name

<user-name>

Specifies the user name to be used for database authentication

Conditional

Password

<password>

Specifies the password that corresponds with the <user-name> provided

Conditional

Subprotocol

<subprotocol>

Specifies the driver-specified subprotocol that is used to build the connection URL

The adapter prepends 'jdbc:' to the value provided.

Format: <database type>:<subprotocol>

Sample values: sybase:Tds oracle:thin

Conditional

Database

<database>

Specifies the name of the database to which the adapter connects

Conditional

Driver

<driver>

Specifies the fully qualified JDBC driver class name

Sample values: com.sybase.jdbc3.jdbc.SybDriver oracle.jdbc.driver.OracleDriver

Yes

Max Wait

<max-wait>

Specifies the number of milliseconds to wait before timing out when establishing a connection to a database

Default value: 60000 (1 minute)

No

Max connection idle time millis

<max-connection-idle-time-millis>

Specifies the maximum time, in milliseconds, that a connection can remain idle before it is closed

Default value: 300000 (5 minutes)

No

Min connection idle time millis

<min-connection-idle-time-millis>

Specifies the minimum time, in milliseconds, that a connection can remain idle before it is closed

Default value: 120000 (2 minutes)

No

Evictor idle time millis

<evictor-connection-idle-time-millis>

Specifies the frequency, in milliseconds, in which a thread that is used to close idle connections, runs

Note: You must set the value of this field to be smaller than the one set for the <max-connection-idle-time-millis> field.

Default value: 60000 (1 minute)

No

Max active connections

<max-active-connections>

Specifies the maximum number of connections allowed at a time in the connection pool

Default value: 10

No

Initial active connections

<initial-active-connections>

Specifies the minimum number of connections created during an adapter startup

Note: This feature is not supported by the poolable API of the Apache software, but it is supported by the BasicDataSource (non-poolable-version).

Default value: 2

No

Max idle connections

<max-idle-connections>

Specifies the maximum number of idle connections allowed at any time

Default value: 5

No

Min idle connections

<min-idle-connections>

Specifies the minimum number of idle connections allowed at any time

Default value: 0

No

Validate query

<validate-query>

Contains a query statement used to validate the connection

Note: This element is required when the <validate-connections-on-return> or <validate-idle-connections> elements are present.

Default value: None

Conditional

Validate connections on return

<validate-connections-on-return>

Indicates whether a connection will be validated when returned to the pool With a value of true, the connection is evaluated to determine status and, if not alive, the connection will be removed from the pool.

Note: The <validate-query> element is required to use this feature.

Valid values: true, false (default)

Validate idle connections

<validate-idle-connections>

Indicates whether periodic checks will be done on idle connections in the pool With a value of true, the connection is evaluated to determine status and, if not alive, the connection is removed from the pool.

Note: The <validate-query> element must be present to use this feature.

Valid values: true, false (default)

No

Event statements

<event-statements>

Contains the <event-statement> element

Yes

Event statement

<event-statement>

Contains the details about the query to be performed on the specified <host>

Yes

Query

<query>

Contains the query to be executed periodically on the specified database

The adapter response contains the query results.

Note: The SQL query for a monitor adapter supports only SELECT statements; you cannot use INSERT, UPDATE, or DELETE statements.

Yes

Poll interval

<poll-interval>

Specifies the interval, in seconds, between queries of the specified <host>

Default value: 60

No

Single monitor event

<single-monitor-event>

Generates an event for all records retrieved by the <query> statement

Valid values: true (default), false

No

The following figure shows a sample configuration file for the Tivoli Netcool/OMNIbus monitor adapter.

XML sample of configuration file for Tivoli Netcool/OMNIbus monitor adapter

<config>
 <targets>
  <target name="target1"default="true">
   <host>dev3</host>
   <port>4100</port>
   <subprotocol>sybase:Tds</subprotocol>
   <user-name>root</user-name>
   <password/>
   <database>alerts</database>
   <driver>com.sybase.jdbc3.jdbc.SybDriver</driver>
   <max-wait>1200</max-wait>
   <max-connection-idle-time-millis>10000</max-connection-idle-time-millis>
   <min-connection-idle-time-millis>1000</min-connection-idle-time-millis>
   <evictor-idle-time-millis>5000</evictor-idle-time-millis>
   <max-active-connections>20</max-active-connections>
   <initial-active-connections>2</initial-active-connections>
   <max-idle-connections>5</max-idle-connections>
   <min-idle-connections>1</min-idle-connections>
   <validate-connections-on-return>true</validate-connections-on-return>
   <validate-idle-connections>true</validate-idle-connections>
   <validate-query>select sysdate from dual</validate-query>        
  </target>
 </targets>
 <event-statements>
   <event-statement>
     <query>select * from alerts.status</query>
    <poll-interval>4</poll-interval>
     <single-monitor-event>true</single-monitor-event>
   </event-statement>
 </event-statements>
</config>


The following figure shows a non-URL XML sample to configure the monitor adapter.

XML sample of a non-URL monitor adapter configuration

<config>
  <targets>
    <target name="target1" default="true">
      <host>dev5</host>
      <port>4100</port>
      <user-name>host</user-name>
        <password>root</password
      <subprotocol>sybase:Tds</subprotocol>
      <database>DB</database>
      <driver>com.sybase.jdbc3.jdbc.SybDriver</driver>
    </target>
  </targets>
  <event-statements>
    <event-statement>
      <query>SELECT * FROM alerts.status;</query>
      <poll-interval>4</poll-interval>
      <single-monitor-event>true</single-monitor-event>
    </event-statement>
  </event-statements>
</config>


The following figure shows an URL XML sample to configure the monitor adapter.

XML sample of an URL monitor adapter configuration

<config>
  <targets>
  <target name="target1" default="true">
   <url><![CDATA[jdbc:sybase:Tds:dev5:4100?USE_METADATA=false&LITERAL_PARAMS=true]]>
   </url>
   <user-name>host</user-name>
   <password>root</password
   <database>DB</database>
   <driver>com.sybase.jdbc3.jdbc.SybDriver</driver>
    </target>
  </targets>
  <event-statements>
    <event-statement>
      <query>SELECT * FROM alerts.status;</query>
      <poll-interval>4</poll-interval>
      <single-monitor-event>true</single-monitor-event>
    </event-statement>
  </event-statements>
</config>

Enabling custom logging

To enable custom logging for the adapter, you must specify a log file name. You can also provide additional parameters for logging.

Note

You must be using TrueSight Orchestration version 8.1 or later to use the custom logging feature. These parameters will be ignored in earlier versions of TrueSight Orchestration Platform.

These parameters are available with supported adapter versions. See TrueSight Orchestration Content documentation for details.

  • Log File Name: Provide a name for the log file.
    This file will be stored in the AO_HOME/tomcat/logs directory. If Log File Max Backup Index value is greater than 0, the log file name is suffixed with the backup index. For example, if the parameter value is a.log, backup log files will have names, such as a.log.1, a.log.2.
  • Log File Size: Specify a size limit for the log file. 
    If the value specified for Log File Max Backup Index is greater than 0, when the specified size is reached, the current file is renamed with the suffix .1. Otherwise, the log file will be reset and over-written. The default value is 10MB. The available units are KiloBytes (KB), MegaBytes (MB) or GigaBytes (GB).
  • Log File Max Backup Index: Enter the maximum number of backup files allowed. The default value is 10.
  • Log File Append: Select this option to append new log information to the existing information in the file. If unselected, the file will be overwritten with new log information.
  • Log Level: Enter the logging level using one of the following choices:

    Logging level

    Description

    DEBUG

    The most detailed logging level; logs low-level messages, normal execution, recoverable erroneous conditions, and unrecoverable erroneous conditions

    INFO

    (default)

    Logs normal execution, recoverable erroneous conditions, and unrecoverable erroneous conditions

    WARN

    Logs recoverable erroneous conditions and unrecoverable erroneous conditions

    ERROR

    The least detailed logging level; logs only error conditions that are not usually recoverable

Encrypting an element's contents

You can add the attribute secure="true" to an XML adapter element XML view to ensure that the element's contents is encrypted when displayed.

Note

You must be using TrueSight Orchestration Platform version 8.1 or later to use this encryption attribute.

Was this page helpful? Yes No Submitting... Thank you

Comments