Top  | Previous | Next

system.alarm.cancel

Description

Cancels any number of alarms, specified by their event ids. The event id is generated for an alarm when it becomes active, and is used to identify a particular event from other events for the same source. The alarm will still be active, but will drop out of alarm pipelines.

Syntax

system.alarm.cancel(alarmIds)

Parameters

String[] alarmIds - List of alarm event ids (uuids) to cancel.

Returns

nothing

Scope

All

Examples

This example shows the basic syntax for cancelling an alarm.

 

system.alarm.cancel(['c27c06d8-698f-4814-af89-3c22944f58c5'])

 

To cancel all currently active alarms:

 

ids = []

results = system.alarm.queryStatus(state=["ActiveUnacked", "ActiveAcked"])

for result in results:

 id = result.getId()

 ids.append(str(id))

 

system.alarm.cancel(ids)

 

See also:

system.alarm.queryStatus