Scripting Object - VcAlarmManager

Scripting-object corresponding to
AlarmManager
Attribute of
VcSdkConnection, VcServiceContent

Scripting Object Description

The alarm manager is a singleton object for managing alarms within a service instance.

Attributes

Name Type Description
defaultExpressionVcAlarmExpression []

@since VI API 2.5
descriptionVcAlarmDescription

@since VI API 2.5
idString

@since Unknown
lastTriggerIdNumber

@since vim legacy version
morefVcManagedObjectReference

returns the ManagedObjectReference of this ManagedObject @since Unknown
sdkConnectionVcSdkConnection

@since Unknown
sdkIdString

@since Unknown
typeStringDeprecated.

Returns the name for the this managed object's vim type @since Unknown
vimHostVcSdkConnection

@since Unknown
vimIdString

@since Unknown
vimTypeString

@since Unknown

Methods

Methods defined in this Scripting Object
_getRef, acknowledgeAlarm, areAlarmActionsEnabled, clearTriggeredAlarms, createAlarm, createPrivateAlarm, createTrigger, enableAlarmActions, getAlarm, getAlarmState, queryPrivateAlarms, retrieveTriggers, setAlarmStatus, syncTriggeredAlarms, testSMTPSetup

_getRef

@since Unknown

Parameters

NameTypeDescription
None

Return Value

Type Description
VcManagedObjectReference

areAlarmActionsEnabled

Returns true if alarm actions are enabled on the specified managed entity. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcManagedEntity


Return Value

Type Description
Boolean

setAlarmStatus

Sets the status of the alarm for a specific entity. This method is valid only for stateful alarms. Any actions specified for the implied transition will fire, as appropriate. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcAlarm

arg1VcManagedEntity

arg2VcManagedEntityStatus


Return Value

Type Description
None

getAlarmState

The state of instantiated alarms on the entity.

@since VI API 2.5

Parameters

NameTypeDescription
arg0VcManagedEntity


Return Value

Type Description
VcAlarmState []

enableAlarmActions

Enables or disables alarms on the specified managed entity. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcManagedEntity

arg1Boolean


Return Value

Type Description
None

syncTriggeredAlarms

Retrieves the full list of currently triggered Alarms, as a list of Triggers. It is a synchronizing API - the list it returns represents all the Alarm runtime states that are in a Triggered Status, and it clears the outbound AlarmTrigger queue, to establish a known state. It resets the lastTriggerId to 0. The caller can rely on the fact that any object/Alarm for which there is no entry in this list is currently green, and that any subsequent change (including status changes, or object creation/deletion) will create entries in the outbound AlarmTrigger queue. @since vim legacy version

Parameters

NameTypeDescription
None

Return Value

Type Description
VcAlarmTrigger []

retrieveTriggers

Retrieves any queued up AlarmTriggers representing Alarm state changes since the last time this method was called. @since vim legacy version

Parameters

NameTypeDescription
arg0Number

arg1Number


Return Value

Type Description
VcAlarmTrigger []

createAlarm

Creates an alarm.

In addition to the Alarm.Create privilege, may also require the Global.ScriptAction if a RunScriptAction action is specified in the AlarmSpec. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcManagedEntity

arg1VcAlarmSpec


Return Value

Type Description
VcAlarm

acknowledgeAlarm

Acknowledge the alarm on a managed entity. The actions associated with the alarm will not fire until the alarm's next distinct occurrence; that is, until after the alarm has entered the green or gray states at least once. Calling this method on an acknowledged or non-triggered alarm. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcAlarm

arg1VcManagedEntity


Return Value

Type Description
None

createTrigger

@since Unknown

Parameters

NameTypeDescription
timeoutNumber

filterString

conditionString

filterToSyncString


Return Value

Type Description
Trigger

getAlarm

Available alarms defined on the entity. These alarms do not include any inherited alarms; that is, alarms associated with parent entities.

@since VI API 2.5

Parameters

NameTypeDescription
arg0VcManagedEntity


Return Value

Type Description
VcAlarm []

queryPrivateAlarms

Retrieves all of the Private (trigger-only) Alarms defined on the specified ManagedEntity. If a ruleName is passed in, it returns all rules whose ruleName equals that value. As a special case, if the entity is omitted, all Private Alarms, defined on any entity, are returned. @since vim legacy version

Parameters

NameTypeDescription
arg0VcManagedEntity

arg1String

arg2Boolean


Return Value

Type Description
VcAlarm []

clearTriggeredAlarms

Resets all triggered alarms to green. Should be used when mass alarm reset is needed. @since vim unstable version

Parameters

NameTypeDescription
arg0VcAlarmFilterSpec


Return Value

Type Description
None

testSMTPSetup

Tests SMTP setup by sending a test email. The email receiver(s) need to check if the test email has been received. @since vim unstable version

Parameters

NameTypeDescription
arg0String


Return Value

Type Description
None

createPrivateAlarm

Creates a Private (trigger-only) Alarm. These Alarms are not visible in the declaredAlarmState[] of the ManagedEntity, but have to be separately retrieved. Private Alarms must have a properly structured alarmMetadata value. It must be an XML document with the following structure, and the "ruleName" node is required and significant. "deviceType" is optional, and only needed (or allowed) for per-device metric thresholds. <config> <trigger> <ruleName>name.of.rule</ruleName> <objectType>type.of.object</objectType> <isDevice>false</isDevice> <!-- optional --> <!-- other data can be added --> <trigger> </config> There can only be one Private Alarm defined on a particular entity with a given ruleName and deviceType. If the ruleName,deviceType of a Private Alarm defined on this entity matches the ruleName,deviceType of an Alarm inherited from a parent, then it is considered to be an implicit override, and the parent Alarm will not be applied to this entity or its children. To "disable" (hide) an inherited alarm on some entity and its children, just define an overriding rule as above, with an AlarmExpression set to an instance of DisableAlarmExpression. @since vim legacy version

Parameters

NameTypeDescription
arg0VcManagedEntity

arg1VcAlarmSpec


Return Value

Type Description
VcAlarm