A global object that contains some useful methods.
Saves an event annotation to specified event. This information can later be useful while viewing raw data (events). The saved annotation may explain some specific situation during execution of the Business Logic formula at specific moment.
The Information parameter specifies the annotation text should be written.
It also accepts an EventId parameter specifying annotated event.
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.)
Returns the value of the specified custom attribute, from the specified resource, at the specified time.
If the attribute doesn't exist at the time of the event, an error occurs.
Example:
Dim AttribVal AttribVal = Tools. GetCustomAttributeForResource. "MyResource", #12/12/2006 12:34:56#, "MyAttribute"
This method returns a recordset taken from the database specified by the connection string, based on the specified query.
Both strings must end with a semicolon (;).
The user may then use this recordset as follows:
Example:
Dim rs
Set rs = Tools.GetExternalData(
"dsn=oblicore;uid=oblicore;pwd=oblicore;", "select * from t_rules")
Do Until rs.EOF
Out.Log "Name=" & rs("RULE_NAME"), "I"
rs.MoveNext
Loop
rs.Close
The method converts a time given in UTC into the time zone of the current metric.
The method converts a time given in the time zone of the current metric into UTC.
Return specifies whether or not the specified attribute exists in the specified resource at the specified time.
Example:
Dim AttribExistsNow AttribExistsNow = Tools. HasCustomAttributeForResource "MyResource", #12/12/2006 12:34:56#, "MyAttribute"
Accepts two parameters that signify a period of time.
The method calculates and returns the amount of time (in seconds) from the beginning of the period to its end, which is within TimeSlots.
Should Begin time be later than End time, the result is a negative number.
Similar to SaveRecord, except that instead of enumerating all values, it provides pairs of field names and related field values. Field numbers can be substituted for field names. (The number of the first value field is 1).
Note: This method is executed only by the Tracking period agent.
Saves a record in a user table. User tables are used to output information during the service-level calculation. This information can later be used to generate reports. There may be many user tables.
The tableName parameter specifies the table to which the information should be written. Each record in the user table has a unique key, which specifies the record to which the information should be written. Each record also has many string-type value fields. The exact number of value fields in each user table and the field names are defined during implementation.
The SaveRecord method receives a user table name and a key. It also accepts all the value fields in the user table. (These value parameters are optional, and may be omitted.) If a record with the same key already exists, it is updated. (Only the value fields transferred as parameters are updated.) If a record with this key does not exist, it is created.
Note: This method is executed only by the Tracking period agent.
This method creates a new metric event. The parameter definitions are as follows:
The time unit parameter is a mandatory parameter, No events are sent if the parameter is not defined or defined incorrectly.
The parameter is not case sensitive.
An error is written to the log if the time unit is defined incorrectly in the business logic.
Example:
Tools.SendEvent "OnEvent", "MyResource", #1/2/2006 13:46:00#, "All", 1, 2
|
Copyright © 2012 CA.
All rights reserved.
|
|