Purpose
Format and send an acknowledge alert event to the Event Server. Acknowledging an alert causes any pending external actions for the alert to be terminated, and initiates any external actions associated with alert acknowledgement.
Syntax
#include "spd.h" SPD_errorTP SPD_AckAlarm( char *objectClass, char *objectName, char *alarmIdentifier, char *alarmQualifier, char *acknowledgeText, char *externalActionList, char *application, char *applicationQualifier, time_t timeValue );
Description
objectClass
identifies the object that is the source of the alert (for example, a system or application). objectClass must match the objectClass specified when the alert was raised (see [xref text to replace] and [xref text to replace]).
objectName
identifies the instance of the object class that is the source of the alert (for example, a system or application name). objectName must match the objectName specified when the alert was raised.
alarmIdentifier
identifies the type of alert being acknowledged. alarmIdentifier must match the alarmIdentifier specified when the alert was raised.
alarmQualifier
further qualifies the type of alert when multiple instances of the alert are raised and must be kept distinct from one another. alarmQualifier must match the alarmQualifier specified when the alert was raised. This parameter is optional. Specify NULL if the alert is not further qualified.
acknowledgeText
is an optional explanation of why the alert is being acknowledged. Specify NULL if no text is supplied.
externalActionList
is the identifier of the external action list that is associated with acknowledging this alert. External action lists are defined in alert policies. If no external action list is associated with acknowledging this alert, or if the external action list is the same as alarmIdentifier, specify NULL.
application
identifies the application that raised the alert. The value must match the application name that was specified when the alert was raised. Specify NULL if the application is the same as the application that was specified on the call to SPD_InitClient.
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 specified on the call to SPD_InitClient.
timeValue
is the local time to be associated with acknowledgment of the alert. Specify the result of the C time function, or 0 if you want no local time to be associated with the acknowledgment of the alert.
Return Value
The return value indicates whether an error occurred, as follows:
Return | Indication |
SPD_normalCN | No error |
SPD_notInitializedCN | SPD_InitClient not called previously |
SPD_badClassCN | Bad objectClass parameter |
SPD_badNameCN | Bad objectName parameter |
SPD_badAlarmIdCN | Bad alarmIdentifier parameter |
SPD_commFailureCN | Communications problem |
See Also
See also the following functions:
SPD_ClearAlarm (see [xref text to replace])
SPD_HandleEvent (see [xref text to replace])
SPD_InitClient (see [xref text to replace])
SPD_SendAlarm (see [xref text to replace])
SPD_SendUserAlarm (see [xref text to replace])