Difference between revisions of "NXSL:Event"

From NetXMS Wiki
Jump to navigation Jump to search
(Created page with "Represents interface object. '''Class Name''' Event '''Attributes''' {| class="wikitable" |- ! Name !! Type !! Description |- | code || int32 || Event code |- | customMe...")
 
m (Text replacement - "^" to "{{deprecated}}")
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Represents interface object.
{{deprecated}}Represents NetXMS event object.




Line 26: Line 26:
|-
|-
| severity || int32 || Event severity
| severity || int32 || Event severity
|-
| source || object || Source object ([[NXSL:NetObj|NetObj]] or it's subclass)
|-
| sourceId || int32 || ID of source object
|-
|-
| timestamp || int64 || Timestamp as number of seconds since epoch (1 Jan 1970 00:00:00 UTC)
| timestamp || int64 || Timestamp as number of seconds since epoch (1 Jan 1970 00:00:00 UTC)
Line 31: Line 35:
| userTag || string || User tag associated with event
| userTag || string || User tag associated with event
|}
|}
The $event->parameters array contains the event's parameters.<br>
$event->parameters[1] == %1<br>
$event->parameters[n] == %n<br>
'''Methods'''
[[NXSL:Event:setMessage|setMessage]]
[[NXSL:Event:setSeverity|setSeverity]]
[[NXSL:Event:setUserTag|setUserTag]]
[[NXSL:Event:toJson|toJson]]
[[Category:NXSL Class Reference]]

Latest revision as of 18:13, 13 September 2022

This Wiki is deprecated and we are are currrently migrating remaining pages into product documentation (Admin Guide, NXSL Guide)

Represents NetXMS event object.


Class Name

Event


Attributes

Name Type Description
code int32 Event code
customMessage string Custom message set in event processing policy
id int64 Unique event identifier
message string Event message
name string Event name
parameters array Event-specific parameters
severity int32 Event severity
source object Source object (NetObj or it's subclass)
sourceId int32 ID of source object
timestamp int64 Timestamp as number of seconds since epoch (1 Jan 1970 00:00:00 UTC)
userTag string User tag associated with event


The $event->parameters array contains the event's parameters.
$event->parameters[1] == %1
$event->parameters[n] == %n


Methods

setMessage

setSeverity

setUserTag

toJson