Missing Events when loading data from AM into EventBase

Document ID : KB000088424
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:

Symptoms

When setting up Policy Orchestrator/Predictive Analytics for use with Applications Manager, not all Jobs might be loaded into the EventBase for further analysis.

 

Cause

If there are jobs with the same start date in the Applications Manager's job history, some of those jobs might be skipped.

 

 

     

    Resolution:

    Please note: You will need Modelling Studio to implement this resolution.

    Create a new dummy EventBase (this is necessary, because a new component is required that is by default only available for Operations Manager EventBases):

    1. In Configuration Manager, add a new dummy EventBase for an Operations Manager:
      .png
       
    2. On the Automic System tab, untick the Check Source DB checkbox:
      .png
       
    3. On the EventBase DB tab, enter valid settings for a database (use a new database that you can remove afterwards or use the same settings as for your Applications Manager EventBase DB).
       
    4. Click Next and Apply. In case your Decision Worker is set to start automatically, there will be errors in the Worker log file concerning the dummy EventBase. You can ignore those errors.
       
    5. After the changed configuration was successfully applied, you can remove the dummy EventBase again by clicking Back, selecting the dummy EventBase, clicking Remove and OK. Again, click Next and Apply to apply the changed configuration and commit the removal of the dummy EventBase.
       
    6. Close Configuration Manager.
       
    7. If you created a new database for the dummy EventBase, you can now remove this database again.

    Open Modelling Studio and modify the Applications Manager EventBase:

    1. Open the Applications Manager EventBase
       
    2. Add a new Thread Pool.
      1. In the tree structure of the EventBase Model view, right click the Thread Pools folder, and from the context menu select Add Thread Pool.
      2. In the Thread Pool Creation Wizard, as display name, use, for example, Filter Duplicate Jobs Thread Pool. Click Next.
      3. In Step 2 of the wizard, select 1 for both, the Min. Threads and Max. Threads values:
        .png
         
      4. Click Finish.
         
    3. Make sure that you are in the Message Enrichment Map: In the EventBase Model view, double click Message Enrichment Map under the Maps folder.
       
    4. Add a new service to the Message Enrichment Map to filter duplicate jobs from the Job History Pull Adapter:
      1. In the tree structure of Components view, navigate to Automic, ApplicationAssurance, EventServices:
        .png
         
      2. Drag the Filter Duplicate Events Service template into the Message Enrichment Map. Select a name for the Event Service or keep the suggested one. Click Next.
      3. In Step 2 of the Event Service Wizard, set the Value of PrimaryKey to @timeCreatedUTC and the Value of SecondaryKey to JobID. Click Next:
        .png
         
      4. In Step 3, uncheck All as an available input port Event Object Type, and only select Automic, AM, Job. Click Next.
      5. In Step 4, uncheck All as an available output port Event Object Type, and only select Automic, AM, Job. Click Finish.
         
    5. Modify the settings for the new Event Service:
      1. Double click the newly created Event Service on the Map. In the Properties view, define the parameters for the Event Service.
      2. Under Settings, Thread Pool, select Filter Duplicate Jobs Thread Pool (i.e. the Thread Pool that you created earlier in Point 2). Under Settings, Processing Mode, select QueuedInOrder:
        .png
         
    6. Connect the new service between the Adapter and the Message Broker Service:
      1. Delete the connection from the Job History Pull Adapter to the Message Broker Service.
      2. Add a connection from the Job History Pull Adapter to the Filter Duplicate Events Service.
      3. Add a connection from the Filter Duplicate Events Service to the Message Broker Service. Your Map should look like this:
        .png
         
    7. Edit the SQL query for the Job History Pull Adapter:
      1. In the tree structure of the EventBase Model view, select the Job History Pull Adapter, located under the Event Adapters folder.
      2. In the Properties view, select the Parameters property and click on the button with the three dots to open the Parameters Property Editor.
      3. Modify the Query parameter. In the Value cell, in the SQL query, find the constraint jh.SO_START_DATE > :param and replace it with jh.SO_JOB_FINISHED >= :param (i.e., change the left hand side column name and change the greater than to a greater than or equal), and find the order by statement and change it from order by jh.SO_START_DATE to order by jh.SO_JOB_FINISHED. Click OK.
         
    8. Save the EventBase.