

Implementation Guide › Implementation › Business Logic Scripting (Business Logic Expert) › Inside the Business Logic › Breach Root Cause Comments and Event Comments
Breach Root Cause Comments and Event Comments
Breach root cause comment can be set in the Business Logic to explain the service level results. The breach root cause comments are associated with Metrics.
It is also possible to generate Event annotations which are comments associated with the Raw Data Events, rather than with the Metric. Both these types of comments can be viewed from the report data.
Two methods in the Business Logic 'Tools' object allow for the creation of breach root cause and event annotations records:
- Tools.AddRootCauseComment (Text, Timestamp, [resourceId])
- Saves a root cause comment. This information can later be useful in generated reports. The saved root cause comment explains a specific situation during execution of the Business Logic formula at a specific moment.The Information parameter specifies the comment should be written.The method receives a timestamp to be saved together with the comment. It also accepts a ResourceId parameter specifying resource related to the method context. (This parameter is optional, and may be omitted.)
- Tools.AddEventAnnotation (EventId, Text)
- These methods can be used anywhere within the Business Logic, and the context of where they apply needs to be considered. Adding a root cause comment may be more relevant at the end of a calculation period, when the reason for the service level to be less than expected for that period is known. Lets assume, for example, during the period of a month there were four outages, all caused by a single device. The root cause comment could then be compiled from some of this information about the outages, so that when the reports are viewed for this period it can seen what has contributed towards any service level violation, during this time. The AddRootCauseComment command is best suited to the OnPeriodEnd event handler routine, or other similar function which is run towards the end of the period being calculated.
- Adding an Event Annotation however, is more suited to the actual Raw Data Event processing and favors its usage to the OnXXXEvent (the custom event handler specified in the registration statement) Within this event handler, all of the fields specific to the actual event are available via the eventDetails object.
- An example of how this might look within the Business Logic could be as follows:
Sub OnPeriodEnd(Time)
pctAvailable = (TotalTime-OutageTime) / TotalTime
Tools.AddRootCauseComment “Violations caused by the
following items: ” & ViolationCollection, Time
End Sub
…
…
Sub OnIncidentEvent(eventDetails)
OutageTime = OutageTime + eventDetails(“TimeToResolve”)
If eventDetails(“TimeToResolve”) > 6 Then
ViolationCollection = ViolationCollection &
eventDetails(“HardwareId”)
Tools.AddEventAnnotation eventDetails.EventId, “Incident “ _
eventDetails(“IncidentId”) & “ not resolved within target
time 6 hours”
End If
End Sub
Copyright © 2013 CA.
All rights reserved.
 
|
|