Incident object
When you are specifying processing for a notification event as part of a notification plan, the Notifications system makes available the Incident object which provides data related to the incident that triggered the plan, and executed the event. The Incident object can be accessed using a WinGate script system (such as the Run Lua or Run Javascript event processors) or the Symbol Browser in an event processor configuration.
The Incident object provides methods which allow you to access the name, log, notification plan, and state of that incident. This allows you to provide information about the incident in any alerts or email notifications you may send as part of the notification event processing.
Incident object
Member
|
Description
|
Log
Log.GetEntry(Number Index)
-
Message
- AsString()
- Contains(Text Search,Boolean CaseSensitive)
- IsEmpty()
- Replace(Text Search,Text Replace)
- Timestamp
- Type
Log.GetLast()
-
Message
- AsString()
- Contains(Text Search,Boolean CaseSensitive)
- IsEmpty()
- Replace(Text Search,Text Replace)
- Timestamp
- Type
Log.Size()
Log.Transcript()
|
The Incident.Log methods allow you to access the details of messages logged against this incident (as they are displayed in the Log pane of the Notifications panel located at Monitoring > Notifications in the WinGate Management console).
e.g. A script could contain
Incident.Log.GetEntry(5).Timestamp
This would provide the timestamp value when the 5th message that has been logged about this particular incident.
|
Name
- AsString()
- Contains(Text Search,Boolean CaseSensitive)
- IsEmpty()
- Replace(Text Search,Text Replace)
|
This method will check for the name assigned to the incident.
|
Plan
- AsString()
- Contains(Text Search,Boolean CaseSensitive)
- IsEmpty()
- Replace(Text Search,Text Replace)
|
This method will provide the name of the Notification plan that has been used for this incident.
e.g. A script could contain
Incident.Plan.Contains("Emergency Plan",0)
This would return true if the name of the Notification plan used for the incident contained Emergency Plan.
|
State
|
The current state of the incident, 1= Active, 2 = suspended, 3 = closing
|
StateText
|
Text describing the current state of the incident.
|