Purpose
Format and send an alert event to the Event Server. The alert cannot include user-defined attributes. Use SPDSendUserAlarm instead if the alert includes user-defined attributes.
Syntax
#using Spo.SPDlib SPD_errorType SPDSendAlarm ( string objectClass, string objectName, string alarmIdentifier, string alarmQualifier, string alarmText, string helpText, string externalActionList, SPD_alarmSeverityType severity, string application, string applicationQualifier, string timeValue );
Description
This function formats and sends an alert event to the Event Server.
objectClass
identifies the object that is the source of the alert (for example, a system or application).
objectName
identifies the instance of the object class that is the source of the alert (for example, a system name or application name).
alarmIdentifier
identifies the type of alert being raised. This value can also be the name of the optional help text file for the alert, if the value you specify for parameter helpText is NULL. This value can also be the identifier of the external action list that is associated with raising this alert, if the value you specify for parameter externalActionList is NULL.
alarmQualifier
further qualifies the type of alert when multiple instances of the alert are raised and must be kept distinct from one another. This parameter is optional. Specify NULL if the alert is not further qualified.
alarmText
is a description of the alert condition. There is no maximum length limit at this time for the alert text.
helpText
is used to provide help text for this alert. Help text is identified for this alert using the following set of rules:
If the value of helpText represents a file name in the Operations Sentinel help text folder, then the contents of that file is the help text.
Otherwise, if the value of helpText is not NULL, the value of helpText is the actual help text.
Otherwise, if the value of helpText is NULL and the value of the alarmIdentifier parameter represents a file name in the Operations Sentinel help text folder, then the contents of that file is the help text.
Otherwise, there is no help text for this alert.
externalActionList
is the identifier of the external action list that is associated with raising this alert. External action lists are defined in Operations Sentinel Console. If no external action list is associated with raising this alert, specify NULL.
severity
indicates the severity of the alert. Do not specify either SPD_clear or SPD_acknowledge functions. Instead, use the function SPDClearAlarm to clear an alert, or the function SPDAckAlarm to acknowledge an alert.
application
identifies the application that is raising the alert. Specify NULL if the application is the same as the application that you specified on the call to SPDInitClient.
applicationQualifier
further qualifies the application in the case where more than one instance of the application may be present. Specify NULL if the application qualifier is the same as the application qualifier that you specified on the call to SPDInitClient or if the application does not need to be further qualified.
timeValue
is the time to be associated with the alert. Specify NULL if no time is to be associated with the alert.
Return Value
The return value indicates whether an error occurred, as follows.
Return | Indication |
SPD_normal | No error |
SPD_notInitialized | SPDInitClient not called previously |
SPD_badClass | Bad objectClass parameter |
SPD_badName | Bad objectName parameter |
SPD_badAlarmId | Bad alarmIdentifier parameter |
SPD_badAlarmQualifier | Bad alarmQualifier parameter |
SPD_badText | Bad alarmText parameter |
SPD_badTime | Bad time string |
SPD_commFailure | Communications problem |
SPD_errException | A .NET runtime exception occurs |
See Also
See also the following client functions:
SPDAckAlarm (see Section [xref text to replace])
SPDClearAlarm (see Section [xref text to replace])
SPDHandleEvent (see Section [xref text to replace])
SPDSendUserAlarm (see Section [xref text to replace])