Alarm

The alarm object is the main object for managing alarms.

alarm.open(alarmConfig)

Opens an alarm.

Returns: void

This function takes as parameter an object with the following fields:

Property Type Default Mandatory Description
subEntityIdentifier String entityId No You can open an alarm on device, subscription or subscriber identifier. With subEntityIdentifier you define selected identifier. If is undefined it will open on provision.administration.identifier identifier
alarmName String No Name that you want to see in opened alarm
ruleName String No Name of rule that produce opening of alarm
severity String ‘INFORMATIVE’ No Severity of alarm. Values can be INFORMATIVE, URGENT or CRITICAL
priority String ‘LOW’ No Priority of alarm. Values can be LOW, MEDIUM or HIGH
description String No Alarm description
extraInfo String No Extra information.

Example of use:

This example open alarm apnMismatch to subscription.

alarmConfig = {
    subEntityIdentifier: "id",
    alarmName: "apnMismatch",
    ruleName: "apnMismatchRule",
    severity: "URGENT",
    priority: "MEDIUM",
    description: "APN mismatch with provisioned value",
    extraInfo: "Extra information"
}
  
alarm.open(alarmConfig);

And this example open alarm highTemperature to device.

alarmConfigDevice = {
    alarmName: "highTemperature",
    ruleName: "highTemperatureRule",
    severity: "URGENT",
    priority: "MEDIUM",
    description: "Device temperature is high"
}

alarm.open(alarmConfigDevice);

alarm.closeByRuleName(closeByRuleConfig)

Closes alarm by rule name.

Returns: void

This function takes as parameter an object with the following fields:

Property Type Default Mandatory Description
ruleName String Yes Rule name that open alarm.
entityIdDatastream String No You can close an alarm on device, subscription or subscriber identifier. With entityIdDatastream you define selected identifier. If is undefined it will close on provision.administration.identifier identifier.

Example of use:

The example close alarm generated by highTemperatureRule to device.

closeByRuleConfig = {
    ruleName: "highTemperatureRule"
}

alarm.closeByRuleName(closeByRuleConfig);

alarm.closeByAlarmName(closeByNameConfig)

Closes alarm by alarm name.

Returns: void

This function takes as parameter an object with the following fields:

Property Type Default Mandatory Description
alarmName String Yes Opened alarm name.
entityIdDatastream String No You can close an alarm on device, subscription or subscriber identifier. With entityIdDatastream you define selected identifier. If is undefined it will close on provision.administration.identifier identifier.

Example of use:

The example close opened alarm apnMismatch to device.

closeByNameConfig = {
    alarmName: "highTemperatureRule"
}

alarm.closeByAlarmName(closeByNameConfig);