Configuring the omni.dat file

When your cloud deployment connects to a process agent that runs external procedures, learn how to configure the omni.dat file so that changes are persisted after any ObjectServer pod restarts.

You can run remote processes by using the Netcool®/OMNIbus process agent from a cloud deployment. The process agent is located on an on-premises deployment. The on-premises process agent can execute an external process (for example, a perl script) running on a RHEL server. You can run other components under process control (for example, gateways, probes) on this server. Your cloud deployment can connect to the process agent and run the perl script. However, when the Netcool/OMNIbus pod is restarted the omni.dat file is reset and so the link to the remote process agent breaks. You can persist updates to the omni.dat between pod restarts to keep automations valid. Configure your cloud ObjectServer with a process agent name, username, and password. Manually update the omni.dat file with the process agent name and host details of your on-premises agent.

For more information, see Using process control to run external procedures in automations external icon in the IBM® Tivoli® Netcool/OMNIbus documentation.

Configure the primary ObjectServer configmap

Check that the omni.dat configuration, which was added to the ncoprimary configmap, is added to the omni.dat file in the primary ObjectServer container.
  1. Configure a Netcool/OMNIbus Process Agent running on a remote VM.
    << EOF > $NCHOME/etc/omni.dat
    #
    # omni.dat file as prototype for interfaces file
    #
    # Ident: $Id: omni.dat 1.5 1999/07/13 09:34:20 chris Development $
    #
    [NCOMS]
    {
    	Primary: 0.0.0.0 4100
    }
    [NCO_PA]
    {
    	Primary: 0.0.0.0 4200
    }
    EOF
    
    $NCHOME/bin/nco_igen
    $OMNIHOME/bin/nco_pad -authenticate none
  2. Create an executable script that can be called by the Netcool/OMNIbus Process Agent.
    << EOF > $NCHOME/omnibus/etc/myscript.sh
    #!/bin/bash
    
    echo $(date): $@ >> /opt/IBM/tivoli/netcool/omnibus/etc/myscript.out
    EOF
    
    chmod +x /opt/IBM/tivoli/netcool/omnibus/etc/myscript.out
  3. Create a full trial NOI Event Manager deployment.
  4. Edit the primary ObjectServer configmap, making sure to set PA hostname and port address correctly.
    oc get configmap evtmanager-objserv-agg-primary-config -o yaml
    apiVersion: v1
    data:
      agg-p-omni-append: |
        [NCO_PA]
        {
          Primary:    carrot1.xyz.com 4200
        }
      agg-p-props-append: ""
      agg-p-sql-extensions: |
        create or replace procedure myExternalAutomation ()
        executable '/opt/IBM/tivoli/netcool/omnibus/etc/myscript.sh'
        host 'carrot1.xyz.com'
        user 0
        group 0
        arguments '\'hello\''
        go
  5. Delete the primary ObjectServer pod.
  6. Check the ncoprimary pod log for the omni.dat appended message, as in the following example message.
    The following will be appended to omni.dat...
    [NCO_PA]
    {
        Primary:    carrot1.xyz.com 4200
    }
  7. Check that the omni.dat file contains the following example lines:
    cat $NCHOME/etc/omni.dat
    [AGG_P]
    {
        Primary:    0.0.0.0  4100
    }
    [AGG_P_C]
    {
        Primary:    127.0.0.1  4100
    }
    [NCO_PA]
    {
      Primary:    carrot1.xyz.com 4200
    }
  8. Check the interfaces file in the ncoprimary pod, as in the following example.
    cat $NCHOME/etc/interfaces.linux2x86
    #
    # interfaces file generated by nco_igen on Tue Aug 15 14:49:34 2023
    #
    #
    # DO NOT AMEND THIS FILE !!!!!!!!
    # MAKE CHANGES IN THE $NCHOME/etc/omni.dat FILE AND
    # RE-GENERATE THIS FILE WITH NCO_IGEN
    #
    
    # AGG_P => 0.0.0.0 4100
    AGG_P
    	master tcp sun-ether 0.0.0.0 4100
    	query tcp sun-ether 0.0.0.0 4100
    
    # AGG_P_C => 127.0.0.1 4100
    AGG_P_C
    	master tcp sun-ether 127.0.0.1 4100
    	query tcp sun-ether 127.0.0.1 4100
    
    # NCO_PA => carrot1.xyz.com 4200
    NCO_PA
    	master tcp sun-ether carrot1.xyz.com 4200
    	query tcp sun-ether carrot1.xyz.com 4200
    
    #
    # EOF
    #
  9. The script runs without error. The script log on the remote server has a related entry showing that the execution occurred.

Configure the backup ObjectServer configmap

Check that the omni.dat configuration, which was added to the ncobackup configmap, is added to the omni.dat file in the backup ObjectServer container.
  1. Edit the backup ObjectServer configmap, making sure to set PA hostname and port address correctly.
    oc get configmap evtmanager-objserv-agg-backup-config -o yaml
    apiVersion: v1
    data:
      agg-b-omni-append: |
        [NCO_PA]
        {
          Primary:    carrot1.xyz.com 4200
        }
      agg-b-props-append: ""
      agg-b-sql-extensions: |
        create or replace procedure myExternalAutomation ()
        executable '/opt/IBM/tivoli/netcool/omnibus/etc/myscript.sh'
        host 'carrot1.xyz.com'
        user 0
        group 0
        arguments '\'hello\''
        go
  2. Delete the backup ObjectServer pod.
  3. Check the ncobackup pod log for the omni.dat appended message, as in the following example message.
    The following will be appended to omni.dat...
    [NCO_PA]
    {
        Primary:    carrot1.xyz.com 4200
    }
  4. Check that the omni.dat file contains the following example lines:
    cat $NCHOME/etc/omni.dat
    [AGG_B]
    {
        Primary:    0.0.0.0  4100
    }
    [AGG_B_C]
    {
        Primary:    127.0.0.1  4100
    }
    [NCO_PA]
    {
      Primary:    carrot1.xyz.com 4200
    }
  5. Check the interfaces file in the ncobackup pod, as in the following example.
    cat $NCHOME/etc/interfaces.linux2x86
    #
    # interfaces file generated by nco_igen on Tue Aug 15 14:49:34 2023
    #
    #
    # DO NOT AMEND THIS FILE !!!!!!!!
    # MAKE CHANGES IN THE $NCHOME/etc/omni.dat FILE AND
    # RE-GENERATE THIS FILE WITH NCO_IGEN
    #
    
    # AGG_B => 0.0.0.0 4100
    AGG_B
    	master tcp sun-ether 0.0.0.0 4100
    	query tcp sun-ether 0.0.0.0 4100
    
    # AGG_B_C => 127.0.0.1 4100
    AGG_B_C
    	master tcp sun-ether 127.0.0.1 4100
    	query tcp sun-ether 127.0.0.1 4100
    
    # NCO_PA => carrot1.xyz.com 4200
    NCO_PA
    	master tcp sun-ether carrot1.xyz.com 4200
    	query tcp sun-ether carrot1.xyz.com 4200
    
    #
    # EOF
    #
  6. The script runs without error. The script log on the remote server has a related entry showing that the execution occurred.