Configuring a uni-directional gateway
About this task
Learn how to configure a uni-directional gateway to create an event feed from an on-premises ObjectServer to a deployment of Netcool® Operations Insight® on Red Hat® OpenShift®. An on-premises primary aggregation ObjectServer must exist and be configured according to Installing a primary aggregation ObjectServer.
Procedure
-
Identify the service details of the Netcool Operations Insight on Red Hat OpenShift deployment's
ObjectServers. Follow the instructions in Exposing ObjectServer ClusterIP services by using the NodePort service or Connecting with the proxy service to identify the primary and backup ObjectServer address and port details.
- On the on-premises host, edit the omni.dat file and add an entry for
a new uni-directional gateway,
'OCP_GATE'
. Add entries for the source and destination ObjectServers,AGG_P
andOCP_AGG_V
. TheOCP_AGG_V
entry has the cloud ObjectServer node port details that you identified in step 1.Example omni.dat file:[AGG_P] { Primary: netcool1-onprem.fqdn 4100 } [OCP_GATE] { Primary: netcool2-onprem.fqdn 4300 } [OCP_AGG_V] { Primary: mycluster.icp 6000 Backup: mycluster.icp 6001 }
- Run
$NCHOME/bin/nco_igen
to create the interfaces file. - Configure the uni-directional gateway table replication and mapping files,
OCP_GATE_tblrep.def and OCP_GATE.map. These files control
which ObjectServer tables and columns are replicated. This example table replication file replicates the
alerts.status
,alerts.journal
, andalerts.details
tables.cat << EOF > $NCHOME/omnibus/etc/OCP_GATE.tblrep.def ############################################################################## # Netcool/OMNIbus Uni-directional ObjectServer Gateway 8.1.0 # # OCP_GATE table replication definition file. # # Notes: # ############################################################################## REPLICATE INSERTS, UPDATES, FT_INSERTS FROM TABLE 'alerts.status' USING MAP 'StatusMap' ORDER BY 'Serial ASC'; REPLICATE INSERTS, UPDATES, FT_INSERTS FROM TABLE 'alerts.journal' USING MAP 'JournalMap'; REPLICATE INSERTS, UPDATES, FT_INSERTS FROM TABLE 'alerts.details' USING MAP 'DetailsMap'; EOF
This example map file maps thealerts.status
,alerts.details
, andalerts.journal
tables.cat << EOF > $NCHOME/omnibus/etc/ICP_GATE.map ############################################################################## # Netcool/OMNIbus Uni-directional ObjectServer Gateway 8.1.0 # # OCP_GATE Multitier map definition file. # # Notes: # # Fields that are marked as 'ON INSERT ONLY' will only be passed when an event # is inserted for the first time. (ie. they will not be updated). The ordering # of the fields is not important as the gateway will use named value insertion. # ############################################################################## CREATE MAPPING StatusMap ( 'Identifier' = '@Identifier' ON INSERT ONLY, 'Node' = '@Node' ON INSERT ONLY, 'NodeAlias' = '@NodeAlias' ON INSERT ONLY NOTNULL '@Node', 'Manager' = '@Manager' ON INSERT ONLY, 'Agent' = '@Agent' ON INSERT ONLY, 'AlertGroup' = '@AlertGroup' ON INSERT ONLY, 'AlertKey' = '@AlertKey' ON INSERT ONLY, 'Severity' = '@Severity', 'Summary' = '@Summary', 'StateChange' = '@StateChange', 'FirstOccurrence' = '@FirstOccurrence' ON INSERT ONLY, 'LastOccurrence' = '@LastOccurrence', 'InternalLast' = '@InternalLast', 'Poll' = '@Poll' ON INSERT ONLY, 'Type' = '@Type' ON INSERT ONLY, 'Tally' = '@Tally', 'ProbeSubSecondId' = '@ProbeSubSecondId', 'Class' = '@Class' ON INSERT ONLY, 'Grade' = '@Grade' ON INSERT ONLY, 'Location' = '@Location' ON INSERT ONLY, 'OwnerUID' = '@OwnerUID', 'OwnerGID' = '@OwnerGID', 'Acknowledged' = '@Acknowledged', 'Flash' = '@Flash', 'EventId' = '@EventId' ON INSERT ONLY, 'ExpireTime' = '@ExpireTime' ON INSERT ONLY, 'ProcessReq' = '@ProcessReq', 'SuppressEscl' = '@SuppressEscl', 'Customer' = '@Customer' ON INSERT ONLY, 'Service' = '@Service' ON INSERT ONLY, 'PhysicalSlot' = '@PhysicalSlot' ON INSERT ONLY, 'PhysicalPort' = '@PhysicalPort' ON INSERT ONLY, 'PhysicalCard' = '@PhysicalCard' ON INSERT ONLY, 'TaskList' = '@TaskList', 'NmosSerial' = '@NmosSerial', 'NmosObjInst' = '@NmosObjInst', 'NmosCauseType' = '@NmosCauseType', 'NmosDomainName' = '@NmosDomainName', 'NmosEntityId' = '@NmosEntityId', 'NmosManagedStatus' = '@NmosManagedStatus', 'NmosEventMap' = '@NmosEventMap', 'LocalNodeAlias' = '@LocalNodeAlias' ON INSERT ONLY, 'LocalPriObj' = '@LocalPriObj' ON INSERT ONLY, 'LocalSecObj' = '@LocalSecObj' ON INSERT ONLY, 'LocalRootObj' = '@LocalRootObj' ON INSERT ONLY, 'RemoteNodeAlias' = '@RemoteNodeAlias' ON INSERT ONLY, 'RemotePriObj' = '@RemotePriObj' ON INSERT ONLY, 'RemoteSecObj' = '@RemoteSecObj' ON INSERT ONLY, 'RemoteRootObj' = '@RemoteRootObj' ON INSERT ONLY, 'X733EventType' = '@X733EventType' ON INSERT ONLY, 'X733ProbableCause' = '@X733ProbableCause' ON INSERT ONLY, 'X733SpecificProb' = '@X733SpecificProb' ON INSERT ONLY, 'X733CorrNotif' = '@X733CorrNotif' ON INSERT ONLY, 'URL' = '@URL' ON INSERT ONLY, 'ExtendedAttr' = '@ExtendedAttr' ON INSERT ONLY, 'CollectionFirst' = '@CollectionFirst' ON INSERT ONLY, ############################################################################## # # CUSTOM alerts.status FIELD MAPPINGS GO HERE # ############################################################################## ############################################################################## 'ServerName' = '@ServerName' ON INSERT ONLY, 'ServerSerial' = '@ServerSerial' ON INSERT ONLY ); CREATE MAPPING JournalMap ( 'KeyField' = TO_STRING(STATUS.SERIAL) + ":" + TO_STRING('@UID') + ":" + TO_STRING('@Chrono') ON INSERT ONLY, 'Serial' = STATUS.SERIAL, 'Chrono' = '@Chrono', 'UID' = TO_INTEGER('@UID'), 'Text1' = '@Text1', 'Text2' = '@Text2', 'Text3' = '@Text3', 'Text4' = '@Text4', 'Text5' = '@Text5', 'Text6' = '@Text6', 'Text7' = '@Text7', 'Text8' = '@Text8', 'Text9' = '@Text9', 'Text10' = '@Text10', 'Text11' = '@Text11', 'Text12' = '@Text12', 'Text13' = '@Text13', 'Text14' = '@Text14', 'Text15' = '@Text15', 'Text16' = '@Text16' ); CREATE MAPPING DetailsMap ( 'KeyField' = '@Identifier' + '####' + TO_STRING('@Sequence') ON INSERT ONLY, 'Identifier' = '@Identifier', 'AttrVal' = '@AttrVal', 'Sequence' = '@Sequence', 'Name' = '@Name', 'Detail' = '@Detail' ); EOF
- Create a gateway properties file, OCP_GATE.props, by copying the
default unidirectional gateway properties file objserv_uni.props.
cp $NCHOME/omnibus/gates/objserv_uni/objserv_uni.props $NCHOME/omnibus/etc/OCP_GATE.props
- Configure the new gateway properties file,
$NCHOME/omnibus/etc/OCP_GATE.props. Set the on-premises ObjectServer
AGG_P
as the source, set the cloud ObjectServerOCP_AGG_V
as the destination, and set the resync type to 'UPDATE', as in the following example:cat << EOF >> $NCHOME/omnibus/etc/OCP_GATE.props Name : 'OCP_GATE' Gate.MapFile : '$NCHOME/omnibus/etc/OCP_GATE.map' Gate.Reader.TblReplicateDefFile : '$NCHOME/omnibus/etc/OCP_GATE.tblrep.def' Gate.Reader.Server : 'AGG_P' Gate.Writer.Server : 'OCP_AGG_V' Gate.Resync.Type : 'UPDATE' Gate.Resync.LockType : 'NONE' Gate.Writer.Description : 'collection_gate' EOF
- Start the new gateway with the following command:
$NCHOME/omnibus/bin/nco_g_objserv_uni -propsfile $NCHOME/omnibus/etc/OCP_GATE.props