This is the documentation for the development version. There are no official binaries for it; build it from the source code in git. Download links on these pages work only after the release. For the current release, see version 7.0.

Action Macro Reference

All action configurations, event message templates, alarm messages, alarm keys, and notification templates support macro substitution for dynamic content.

Event and Object Macros

Macro Description

%n

Name of event source object

%a

IP address of event source object

%i

Unique ID of event source object in hexadecimal form

%I

Unique ID of event source object in decimal form

%g

Globally unique identifier (GUID) of event source object

%c

Event code

%N

Event name

%u

IP address of event source object in URL-compatible form (bracketed for IPv6)

%U

Login name of the user who executed the object tool or requested the expansion from the client; empty in event processing (EPP actions, alarm messages, event message templates)

%s

Event severity code as number (0=Normal, 1=Warning, 2=Minor, 3=Major, 4=Critical)

%S

Event severity code as text

%m

Event message text

%t

Event timestamp as day.Month.year hour:minute:second in the server’s local time (e.g., 05.Aug.2026 14:30:00)

%T

Event timestamp as seconds since epoch (Unix time)

%v

NetXMS server version

%C

Comment of event source object

%L

Alias of event source object

%z

Zone UIN of event source object

%Z

Zone name of event source object (empty when zoning is disabled; the UIN in square brackets if the zone object is not found)

Alarm Macros

These macros are populated when the action is triggered from an alarm-generating or alarm-resolving EPP rule. %A and %K also resolve from the last-alarm data recorded for the event when no alarm is attached; only %y and %Y strictly require an alarm in context.

Macro Description

%A

Alarm message text

%K

Alarm key

%y

Alarm state (numeric): 0=Outstanding, 1=Acknowledged, 2=Resolved, 3=Terminated (state is the lower 4 bits, mask 0x0F; bit 0x10 indicates sticky acknowledgement)

%Y

Alarm ID

Event Parameter Macros

Macro Description

%1 through %99

Positional event parameters; when no event is in context (e.g., in object tools), positional object tool arguments are used instead

%<name>

Named event parameter

%<name:default_value>

Named event parameter with fallback default value if parameter is not set

%<{format-specifier}name>

Named event parameter formatted with the measurement unit of the DCI the event is associated with; without such a DCI the value is inserted as is. The format specifier is a comma-separated list: u (or units) appends the unit, m (or multipliers) applies multipliers, for example %<\{u,m\}value>. With u, a value of a DCI with the unit TimeSpan is formatted as a duration, [-][n days, ]hh:mm:ss, and a value of a DCI with the unit Epoch time as a date and time, whether or not m is also given. A missing or empty value stays empty

%E

Comma-separated list of user tags associated with the event

Custom Attribute and Script Macros

Macro Description

%{name}

Custom attribute of the source object (the instance-specific attribute name::<instance> is tried first, then plain name)

%\{name:default_value\}

Custom attribute of the source object with fallback default value

%[name]

Return value of script library script named name. Arguments can be passed as %[name(arg1, arg2)], and an entry point can be selected as %[name.entry] or %[name/entry]. The script runs in the restricted security context and receives $event and, when an alarm is in context, $alarm, $alarmMessage, and $alarmKey

Special Context Macros

Macro Description

%d

Description of the associated Data Collection Item (available whenever the event or alarm carries a DCI reference, such as threshold and DCI state events)

%D

Comment of the Data Collection Item (same availability as %d)

%M

Custom message text set via CUSTOM_MESSAGE variable in EPP filtering script

Escape Sequences

Macro Description

%(nl)

Newline (CR+LF)

%(cr)

Carriage return

%(lf)

Line feed

%(tab)

Tab character

%(in:fieldname)

Value of the input field named fieldname (used in Object Tools)

%%

Literal percent sign

URL Encoding

Placing ~ directly after the % URL-encodes the expanded value of any macro, for example %~n, %~{name}, %~<name>, or %~[script]. Use it when a macro value is inserted into a URL (for example, in a dashboard web page element URL or a web service request).