SPDSendUserAlarm

Purpose

Format and send an alert event to the Event Server. The event can specify names and values for one or more user-defined attributes.

Syntax

#using Spo.SPDlib
SPD_errorType SPDSendUserAlarm
(
   string objectClass,
   string objectName,
   string alarmIdentifier,
   string alarmQualifier,
   string alarmText,
   string helpText,
   string externalActionList,
   SPD_alarmSeverityType severity,
   string application,
   string applicationQualifier,
   string timeValue,
   int attrCount,
   string [] attrNames,
   string [] attrValues
);

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 alerts with the same alarmIdentifier 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.

helpText

is used to provide help text for this alert. Help text is identified for this alert using the following set of rules:

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.

attrCount

is the number of attributes whose values are being reported for the specified object.

attrNames

is a list of the attribute names whose values are being reported. There must be attrCount entries in this list. It is the responsibility of the calling program to allocate the memory for this list. There is a one-to-one correspondence between the entries in the lists attrNames and attrValues. Names in this list cannot be NULL.

attrValues

is a list of the attribute values being reported. There must be attrCount entries in this list. It is the responsibility of the calling program to allocate the memory for this list. There is a one-to-one correspondence between the entries in the lists attrNames and attrValues. Values in this list can be NULL.

Return Value

The return value indicates whether an error occurred, as follows.

Return

Indicates

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: