View Only

AIOps v3.1 - Series 07 : Configuring Event Manager

By Jeya Gandhi Rajan M posted Wed May 12, 2021 05:14 PM


The article explains about the following configuration on Event Manager in Watson AIOps.

  • Configure Event Manager Gateway
  • Exposing an ObjectServer in Event Manager

The article is based on the the following

  • RedHat OpenShift 4.6 on IBM Cloud (ROKS)
  • Watson AI-Ops 3.1.0

1. Configure Event Manager Gateway

The section explains about how to Configure Event Manager Gateway in Watson AIOps. This event manager gateway helps to push events from Event Manager to AI-Manager.

Here are the steps to create Event Manager Gateway.

  1. Goto Installed Operators Page in the Openshift Container Platform.

  1. Click on IBM Watson AIOps AI Manager operator

  2. Click on Create Instance in Event Manager Gateway card

  1. Enter any value in Name field

  1. Enter accept inLicense field

  2. Enter INSERTS inReplication Type field

  1. Enter the below value in Filter field. This is to filter the events, Only the events satisfying the filtered conditions would be send to AI-Manager.
( Type IN (1, 13, 20) AND Class != 99999 AND Manager = \'CEM\')

If you have metrics manager installed, you can have the filter like this.

( (Manager = \'TASP probe running on\') AND ( Node = \'details-v1-deployment-id\' OR  Node = \'productpage-v1-deployment-id\' ) )  OR (Type IN (1, 13, 20) AND Class != 99999 AND Manager = \'CEM\')

  1. Click on Create button

The event mangaer gateway should have been created.

2. Exposing an ObjectServer in Event Manager

This section explain about how to expose the ObjectServer of the Event Manager outside cluster, which helps to push events to event manager through CURL.


1. Login to the OCP

Login into the OCP cluster where you have AIOps Installed.

2. Edit configmap

2.1 Edit the configmap suffixed with objserv-agg-primary-config

Run the below command

oc get configmap | grep agg-primary-config

Mostly you will get the evtmanager-objserv-agg-primary-config as an output. If so use the below command as it is. Otherwise change the confimap and use it.

oc edit configmap evtmanager-objserv-agg-primary-config

2.1 Update the below property.

  agg-p-props-append: |
    NRestOS.Enable: TRUE
    NHttpd.EnableHTTP: TRUE
    NHttpd.ListeningPort: 8080

3. Recreate pod

Delete the pod suffixed with ncoprimary-0, to reflect the configmap changes.

oc get pod | grep ncoprimary-0

Mostly you will get the evtmanager-ncoprimary-0 as an output. Run the below command, if required change the pod name.

oc delete pod evtmanager-ncoprimary-0

Wait here until the pod is recreated.

4. Create Service

Expose the above pod (after it is recreated) and create a service called objserver-nodeport

Use right pod name here.

oc expose pod evtmanager-ncoprimary-0 --port=8080 --type=NodePort --name=objserver-nodeport

5. Create Route

Expose the above service and create route called objectserver-route

oc expose service objserver-nodeport --name=objectserver-route --port=8080

6. Retrieve host path

Get the host path from the above created route.

oc get route objectserver-route -o yaml

It may be like this

By framing the url like the below, we can push the events to eventmanger

7. Retrieve Password

To push events, we need password along with the above url.

Get the password from the secret ends with omni-secret

oc get secret noi-omni-secret -o yaml

You need to decrypt the password like this.

echo "asdfasdfsadfasdfsd" | base64 -d

The output could be pMl4XUx3TsIFAbC

Pushing Events to EventManagr using Curl

You can push events like the below.

curl -X POST -v -u root:pMl4XUx3TsIFAbC -H "Accept: application/json" -H "Content-Type: application/json" -d @ratings_pod_down.json

The ratings_pod_down.json down file is avilable here , which you can copy to the current folder where you run the above script.


Exposing an ObjectServer port in a Netcool® Operations Insight on Red Hat® OpenShift® deployment

Install the Event Manager Gateway with the OpenShift console

Released by :

Jeya Gandhi Rajan M
Vijaya Bhaskar R Siddareddi
Vijay Sukthankar (Squad Leader)

Hybrid-Cloud Squad
GSI Labs