Overview

Skill Level: Any Skill Level

This recipe explains a new method to handle retries of sending events to a Netcool system. See recipe "ScienceLogic EM7 to Netcool event integration (JSON)" to set the SL1 to send events to Netcool.

Ingredients

For this recipe the prerequisite is to have the ScienceLogic to Netcool Event Integration implemented (see ScienceLogic EM7 to Netcool event integration (JSON) recipe at https://developer.ibm.com/recipes/tutorials/sciencelogic-em7-to-netcool-event-integration/).

Step-by-step

  1. Changes to the existing Netcool Runbook

    1)    Change the existing Netcool Runbook Action to display the execution status as shown below (if not yet):

    a)    In case of success, the existing action should display following strings:

                           ‘Netcool Omnibus Request Okay’

    b)    In case of error:

                           ‘Netcool Omnibus Request Failed’

                           ‘#EventID:%s#’ % (EM7_VALUES[‘%e’])

                           ‘#Organization:%s#’ % (str(EM7_VALUES[‘%O’]))

                           ‘#JsonPayload:%s#’ % (str(JSON_PAYLOAD))

    2)    Add a new action to the existing Netcool Automation (GSMA Event Validation_dalpont on this example). The action will check the previews action’s execution and decide if the event should be queued for retry or not.

    Automation Example:

    Automation_GSMA-Event-Forward

     

    3)    New Action Example (GSMA Event Validation_dalpont on this example)

    Action_GSMA-Event-Validation

     

    Action code -> https://github.ibm.com/MnE-ScienceLogic/Netcool-Integration/blob/master/Action_GSMA%20Event%20Validation.py

  2. Create a new Netcool Runbook for the Retry flow

    1)    Create a new automation for the retry flow that will contains 3 new actions (READ, EXEC and EVAL) and will be triggered by a new schedule (Every5min on this example)

     

    Automation Example:

    Capturar

     

    2)    Create the new action READ as the example below – Action will read the event queue (if any) and prepare event t be resent.

    Action_GSMA-Event-Retry-Read

    Code for the action READ -> https://github.ibm.com/MnE-ScienceLogic/Netcool-Integration/blob/master/Action_GSMA%20Event%20Retry%20Read.py

     

    3)    Create the new action EXEC as the example below – Action will resend the event to Netcool.

    Action_GSMA-Event-Retry-Exec

    Action EXEC -> https://github.ibm.com/MnE-ScienceLogic/Netcool-Integration/blob/master/Action_GSMA%20Event%20Retry%20Exec.py

     

    4)    Create the new action EVAL as the example below. It will evaluate if event was sent successfully and can be deleted from the queue or not.

    Action_GSMA-Event-Retry-Eval

    Action EVAL -> https://github.ibm.com/MnE-ScienceLogic/Netcool-Integration/blob/master/Action_GSMA%20Event%20Retry%20Eval.py

  3. Create a new Runbook Schedule to trigger the Retry Automation

    Create a new runbook schedule to call the automation every 5 min as shown below.

    Capturar2

Join The Discussion