Alert.AlertLevel Property
Gets or sets the severity of the alert.
Alert.AlertLevel
Access
Read/Write
Return Value
Integer
Remarks
The following values are used to indicate the severity level for the alert.
Value | Description |
---|---|
10 | Success |
20 | Information |
30 | Warning |
40 | Error |
50 | Critical Error |
60 | Security Issue |
70 | Service Unavailable |
Severity values are displayed using text descriptions, such as Service Unavailable or Success, in the MOM Operator console or the Web console. The severity for active alerts will also determine the state and color of the server in the Operations console. The server will be Yellow if the alert severity is 30 or 40. The server will be Red if the alert severity is 50, 60 or 70.
Examples
The following example shows how to create a new alert and set the Severity property to 50.
Function CreateNewAlert()
Dim objCreatedAlert
Dim objAlert
Set objCreatedAlert = ScriptContext.CreateAlert()
If (ScriptContext.IsAlert()) Then
Set objAlert = ScriptContext.Alert
objCreatedAlert.Name = objAlert.Name
objCreatedAlert.AlertLevel = 50
objCreatedAlert.Owner = "[unassigned]"
objCreatedAlert.ResolutionState = 0 ' New
Else
Set objCreatedAlert = Nothing
End If
Set objAlert = Nothing
Set CreateNewAlert = objCreatedAlert
End Function
Requirements
Platforms: Requires Windows 2000 or later
Version: Requires MOM 2000 or later