Skip to content

Latest commit

 

History

History
195 lines (156 loc) · 4.05 KB

File metadata and controls

195 lines (156 loc) · 4.05 KB

Alarm

Represents NetXMS alarm.

Instance attributes

ackBy: int

ID of user who acknowledged this alarm.

ackByUser ⇒ [class-userdbobject]

User who acknowledged this alarm (class [class-userdbobject]).

categories: Array

Array with alarm category names.

creationTime: int

Unix timestamp of the alarm creation time.

dciId: int

If alarm was created as a result of DCI threshold violation, this attribute will contain ID of the DCI.

eventCode: int

Event code of originating event.

eventId: int

ID of originating event.

eventName: String

Name of originating event.

eventTagList: float

List of event tags as a comma separated string

helpdeskReference: String

Helpdesk system reference (e.g. issue ID).

helpdeskState: int

Helpdesk state:

  • 0 = Ignored

  • 1 = Open

  • 2 = Closed

id: int

Unique identifier of the alarm.

impact: String

Alarm impact text

key: String

Alarm key.

lastChangeTime: int

Unix timestamp of the last update.

message: String

Alarm message.

originalSeverity: int

Original severity of the alarm.

parentId: int

Parent alarm id

repeatCount: int

Repeat count.

resolvedBy: int

ID of user who resolved this alarm.

resolvedByUser ⇒ [class-userdbobject]

User who resolved this alarm (class [class-userdbobject])

rcaScriptName: String

Name of root cause analysis script

relatedEvents: Array

Array with related event IDs.

Added in version 6.0

ruleGuid: String

Guid of the rule that generated the event.

ruleDescription: String

Description of the rule that generated the event.

severity: int

Current alarm severity.

sourceObject: int

ID of the object where alarm is raised.

state: int

Alarm state:

  • 0 = Outstanding

  • 1 = Acknowledged

  • 2 = Resolved

  • 17 = Sticky acknowledged

Instance methods

acknowledge(): int

Acknowledge alarm. Return 0 on success or error code on failure.

addComment(commentText, syncWithHelpdesk): int

Add new alarm comment.

Table 1. Parameters

commentText

String

Text of the new alarm comment.

syncWithHelpdesk

String

Optional. If synchronization with helpdesk should be done. TRUE by default.

Return

Id of the newly created alarm comment.

expandString(string): String

Expand string by replacing macros with their values.

Table 2. Parameters

string

String to expand

Return

Formated string

getComments(): Array

Get array of alarm comments.

Return

Array of [class-alarmcomment] objects.

requestAiAssistantComment(): String

Request an AI assistant comment for this alarm.

Return

String containing the AI assistant’s response, or NULL if empty.

resolve(): int

Resolve alarm. Return 0 on success or error code on failure.

terminate(): int

Terminate alarm. Return 0 on success or error code on failure.