Retrieve CausedBy and Causes Relationship on a Notification via ASL script
search cancel

Retrieve CausedBy and Causes Relationship on a Notification via ASL script

book

Article ID: 398942

calendar_today

Updated On:

Products

VMware Smart Assurance VMware Telco Cloud Service Assurance

Issue/Introduction

This article explains how one can retrieve the "CausedBy" and "Causes" based impact propagation on a Notification.
These fields directly determine the "IsRoot" and "IsProblem" fields on the Notifications which is crucial in determining problems with co-relation.

Environment

Smarts 10.1.X
TCSA 2.4

Resolution

The CausedBy or Impact tab comes in because Smarts creates a relationship between any two events based upon the output of the getExplainedBy or getExplains from the underlying domain manager (other than SAM or OI, In case of SAM or OI the notification would already have that relationship).

Usually SAM does not create the events in CausedBy or Impact Tab, it makes the two function call against the event that is coming from the IP domain. The IP domain's model need to have the relationship in-order for SAM to get the CausedBy and Impact.

 

To retrieve the CausedBy and Causes on a notification, via an ASL script using the following:

  • getExplains() - The getExplains() function returns a list of events which provide the information to a problem in order to emphasize events that occur because of a problem.
  • getExplainedBy() - The getExplainedBy() function is the inverse of the getExplains() function. It returns those problems that the Notification in question has listed as explaining this problem. 

The script sample to make use of these methods can be as follows:

START() { .. eol } 
do{ 
  getEx = " "; 
  getExB = " "; 
  getEx = getExplains("ICS_Notification", "<Insert Notification Name Here>" , "RootCause")?IGNORE;
  getExB = getExplainedBy("ICS_Notification", "<Insert Notification Name Here>" , "Symptom")?IGNORE;
  print("Impacts obtained from getExplains(): ".getEx." CausedBy obtained from getExplainedBy(): ".getExB); 
  stop(); 
}

 

Additional Information

For example interdependent notification pair (Down ↔ Unresponsive) the results would look like:: 

The SAM Domain has the following properties via dmctl command:

./dmctl -s SAM get ICS_Notification:: 'NOTIFICATION-Firewall_ExampleDevice_Unresponsive' | grep -iE 'IsRoot|IsProblem|CausedBY|Causes'
                             CausedBy = { ICS_Notification::NOTIFICATION-Firewall_ExampleDevice_Down }
                               Causes = {  }
                            IsProblem = FALSE
                             IsRoot = FALSE

./dmctl -s SAM get ICS_Notification:: 'NOTIFICATION-Firewall_ExampleDevice_Down' | grep -iE 'IsRoot|IsProblem|CausedBY|Causes'
                             CausedBy = {  }
                               Causes = { ICS_Notification::NOTIFICATION-Firewall_ExampleDevice_Unresponsive }
                            IsProblem = TRUE
                             IsRoot = TRUE

The script returns the following:

  • For : NOTIFICATION-Firewall_ExampleDevice_Unresponsive
    Impacts obtained from getExplains(): {  } CausedBy obtained from getExplainedBy(): { { ICS_Notification, NOTIFICATION-Firewall_ExampleDevice_Down, RootCause } }

  • For : NOTIFICATION-Firewall_ExampleDevice_Down
    Impacts obtained from getExplains(): { { ICS_Notification, NOTIFICATION-Firewall_ExampleDevice_Unresponsive, Symptom } } CausedBy obtained from getExplainedBy(): {  }