Configuring the OMNIbusEventReader with an ObjectServer pair for New Events or Inserts

About this task

To configure an OMNIbuseventReader to work in an ObjectServer failover or failback configuration, you must add properties to the eventreader.props file. Adding properties to the eventreader.props file overrides selecting or clearing the Get Updates Events check box in the UI.

Procedure

  1. Identify the OMNIbusEventReader that is to query the Netcool®/OMNIbus failover/failback pair. A new Netcool/Impact installation provides a reader that is called OMNIbusEventReader but you can create more instances in the Services UI.
  2. Stop the Impact Server. In a Netcool/Impact clustered environment, stop all the servers.
  3. Go to your $IMPACT_HOME/etc directory and look for the .props file that corresponds to your OMNIbusEventReader.
    The file is in the following format:
    <servername>_<readernameinlowercase>.props
    where <servername> is the name of your Impact Server instance.

    For example, If your Netcool/OMNIbus server instance is NCI1 and your reader is OMNIbusEventReader, the file would be NCI1_omnibuseventreader.props

  4. Edit the .props file and add the following lines:
    impact.<readernameinlowercase>.objectserver.queryfornewevents=true
    impact.<readernameinlowercase>.objectserver.updatefornewevents=true
    For example:
    impact.omnibuseventreader.objectserver.queryfornewevents=true
    impact.omnibuseventreader.objectserver.updatefornewevents=true
    Note:

    The queryfornewevents property configures the event reader to add "ImpactFlag=0" to the SQL query. The updatefornewevents property configures the event reader to automatically set ImpactFlag to 1 after the event is processed.

    If you have two or more readers that are processing the same events, you should use different flags for each reader so that one reader does not set the flag before the other reader(s) get an opportunity to pick up the event. See . Additional customization using a field other than ImpactFlag.

  5. Copy the sql file nci_omnibus_update.sql in the $IMPACT_HOME/install/dbcore/OMNIbus folder to the machines where the primary and secondary instances of the ObjectServer are running. This script adds the Integer field ImpactFlag to the alerts.status schema. Run this script against both the primary and secondary ObjectServer pairs.
    • For UNIX based platforms, you can run the SQL script:
      cat <path to nci_omnibus_update.sql> | ./nco_sql -server '<servername> 
      -user '<username>' -password '<password>'
      
      

      For example, if the nci_omnibus_update.sql is placed in the /opt/scripts folder and I want to run this script against the ObjectServer instance NCOMS, connecting as the root user with no password, the script can be run as:

      cat /opt/scripts/nci_omnibus_update.sql | ./nco_sql -server 'NCOMS' 
      -user 'root' -password “”
    • For Windows platforms, you can run the SQL script as:
      type <path to nci_omnibus_update.sql> | isql.bat -S <servername> 
      -U <username> -P <password>
      For example, place the nci_omnibus_update.sql file in the OMNIHOME/bin folder and run this script against ObjectServer instance NCOMS, connecting as root with no password:
      type nci_omnibus_update.sql | isql.bat -S NCOMS -U root -P
      
      Make sure that -P is the last option. You can ignore providing the password and enter it when prompted instead. For information aboutNetcool/OMNIbus, see the IBM Tivoli Netcool/OMNIbus Administration Guide available from the following website:

      https://www.ibm.com/support/knowledgecenter/SSSHTQ/landingpage/NetcoolOMNIbus.html.

  6. When the script is completed, an Integer field ImpactFlag is added to the alerts.status schema. Check that the integer field called ImpactFlag is added for each ObjectServer instance primary and secondary.
    Important: The ImpactFlag must be included in the omnibus bidirectional gateway mapping file.
  7. Start your Netcool/Impact server and the OMNIbusEventReader.
    In a clustered setup, start the primary server first followed by all the secondary servers.
  8. You can check the OMNIbusEventReader logs and verify that the query now has ImpactFlag = 0 as a condition. Once Netcool/Impact finishes processing events, which match the ImpactFlag = 0 criteria, it automatically updates the alerts.status table so that ImpactFlag gets set to 1. This prevents the OMNIbusEventReader from reading the same events again and Netcool/Impact reads and processes only new events and inserts that it has not read before.