Running the gateway

This topic describes how to run the gateway on UNIX and Windows operating systems. On Windows operating systems, you can run Process Control as a service and configure it to run the gateway.

Before running the gateway on UNIX and Windows operating systems for the first time, do the following:

  1. Load the SQL (Structured Query Language) commands contained in the servicenow.sql file as follows:

    On UNIX:

    $OMNIHOME/bin/nco_sql -server server_name -user user_name
                          -password 'password' < $OMNIHOME/gates/servicenow/servicenow.sql

    On Windows:

    %OMNIHOME%\bin\isql.bat -U user_name -P 'password' -S server_name -i servicenow.sql
    Note: The servicenow.sql file adds six new columns to the ObjectServer alerts.status table and inserts values into alerts.conversions to map the ServiceNowState from an integer to a String. This is so that the state is displayed as a String in the EventList.

    Where:

    • server_name: Specifies the name of the ObjectServer instance that the gateway is running against.
    • user_name: Specifies the username for the user account to run the nco_sql command on the ObjectServer instance that the gateway is running against.
    • 'password': Specifies the password for the user account to run the nco_sql command on the ObjectServer instance that the gateway is running against. Single or double quotes for the password are acceptable.
    • <: Specifies the UNIX redirection operator that executes the nco_sql command using $OMNIHOME/gates/servicenow/servicenow.sql as the source of input.

    The previous configuration step results in the following actions:

    • Adding these six columns to the ObjectServer alerts.status table: ServiceNowErrorCode, ServiceNowState, ServiceNowSysId, TTNumber, CloseCode, and CloseNotes.
    • Creating and populating a conversions table to convert ServiceNowState integer values to their string equivalents.
    • The alerts.conversion table is populated with the ServiceNowState conversion values as per the latest ServiceNow Incident State model.
  2. Edit the G_SERVICENOW.props properties file and then copy it under the $OMNIHOME/etc directory. The following properties must be updated:
    • Gate.ServiceNow.Host - Specify the IP address or hostname of the host server on which the ServiceNow instance is running.
    • Gate.ServiceNow.Username - Specify the username for the user account that the gateway uses to access the ServiceNow instance.
    • Gate.ServiceNow.Password - Specify the password for the user account that the gateway uses to access the ServiceNow instance.
    • Gate.RdrWtr.Server - Specify the name of the ObjectServer the gateway is running against.
    • Gate.ServiceNow.AuthenticationType - Specifies the authentication type that the gateway should use, namely Basic or OAuth 2.0.
    • Gate.ServiceNow.ClientId - Specifies the Client ID that the gateway should use (for OAuth 2.0 Authentication only).
    • Gate.ServiceNow.ClientSecret - Specifies the Client Secret that the gateway should use (for OAuth 2.0 Authentication only).

    See Properties and command line options for more information on these properties.

  3. If you are upgrading from a previous release of the ServiceNow gateway, remove the following JAR files from the $OMNIHOME/gates/java/ directory:

    ```
    commons-httpclient-3.1.jar
    commons-logging-1.1.1.jar
    commons-codec-1.6.jar
    ```
    

    Newer versions of these Apache libraries are now provided by the Java Gateway Framework (nco_g_java) that is bundled with the gateway package.

To run the gateway on UNIX operating systems, use the following command:

$OMNIHOME/bin/nco_g_servicenow

The command can take command line options; for example: -propsfile <path to gateway properties file>

To run the gateway on Windows operating systems, use the following command:

Note: The following example shows how to run the gateway on a Windows 32 bit operating system with a 32 bit Java Runtime Environment (JRE). Occasionally, you might see an error message similar to this: This app can't run on your PC. To find a version for your PC, check with the software publisher. The solution to this issue is to run the gateway on a Windows 32 bit operating system with a 64 bit JRE (which means you would be executing a 64 bit jave.exe). You may have a 64 bit JRE already installed. Otherwise, you will have to install a 64 bit JRE.

When running the gateway on a Windows operating system, change directory to %OMNIHOME%\gates\win32\ and use the following command:

nco_g_servicenow.bat

The command may take command line options; for example. -propsfile <path to gateway properties file>

Note: With no command line arguments, the gateway expects to find its properties file, G_SERVICENOW.props, located in the $OMNIHOME/etc directory.
Note: For additional information on running gateways and for running a second instance of a gateway on the same host, see the IBM Tivoli Netcool/OMNIbus Probe and Gateway Guide.