@events = $session->getCauses( $objectname, $event [, $oneHop] );
The getCauses() function returns a list of problems that cause an event.
The function arguments are class, instance (possibly combined into one, for example, SM_System::SM-System), and event. The function returns the problems that cause the event based on the relationships among instances defined in the Domain Manager.
The oneHop parameter is optional:
-
If it is omitted or passed as FALSE, the full list of problems that explain eventname, whether directly or indirectly, is returned.
-
If it is passed as TRUE, only those problems that directly list eventname among the events they explain are returned.
The function returns an array of array references with the format:
[ [ <classname::instancename>,<problemname> ], [ <classname::instancename>,<problemname> ], ... ]
Example:
@causes = $session->getCauses( "Router::gw1", "MightBeUnavailable" );