Node
Represents NetXMS node object. Extends DataCollectionTarget.
Instance attributes
- aiHint: String
-
Hint for AI anomaly profile generation.
- alarms ⇒ array
-
List of active Alarms for this object.
- alarmStats ⇒ array
-
Integer array that consists of 5 numbers - each number represents number of alarms for this and child objects for each of severity.
- alias: String
-
Object alias. For interfaces it is automatically collected on configuration poll (e.g. from SNMP ifAlias).
- asset ⇒ Asset
-
Reference to asset class of asset linked to this object.
nullif no asset is linked or the script has no read access to the asset.
- assetId: int
-
Id of linked asset object.
- assetProperties ⇒ AssetProperties
-
Reference to asset properties class of asset linked to this object.
- backupZoneProxy: Node
-
Currently selected backup zone proxy (
nullif zoning is disabled, backup proxy is not assigned, or the script has no read access to the proxy node)
- backupZoneProxyId: int
-
ID of currently selected backup zone proxy (
0if zoning is disabled or backup proxy is not assigned)
- category: String
-
Object’s category name
- categoryId: int
-
Object’s category ID
- children ⇒ array
-
List of direct child objects. Only objects the script has read access to are included. Use classof to differentiate.
- city: String
-
Postal address - city.
- comments: String
-
Object comments.
- country: String
-
Postal address - country.
- creationTime: int64
-
Object creation time as UNIX timestamp
- customAttributes ⇒ HashMap
-
Hash map of object custom attributes.
- district: String
-
Postal address - district.
- geolocation ⇒ GeoLocation
-
Object geographical location.
- guid: String
-
Object GUID as
string.
- id: int
-
Unique object identifier.
- ipAddr: String
-
Primary IP address. Deprecated and will be removed in a future version, use
ipAddressinstead.
- ipAddress ⇒ InetAddress
-
Added in version 5.1
Primary IP address.
- isInMaintenanceMode: bool
-
Maintenance mode indicator (
trueif object currently is in maintenace mode).
- isMaintenanceScheduled: bool
-
TRUEif there is a scheduled task that will put this object into maintenance mode.
- maintenanceInitiator: int
-
Maintenance initiator user id
- mapImage: String
-
GUID of object image used for representation on the maps.
- name: String
-
Object name.
- nameOnMap: String
-
Object name displayed on map.
- postcode: String
-
Postal address - postal code.
- primaryZoneProxy: Node
-
currently selected primary zone proxy (
nullif zoning is disabled, primary proxy is not assigned, or the script has no read access to the proxy node)
- primaryZoneProxyId: int
-
ID of currently selected primary zone proxy (
0if zoning is disabled or primary proxy is not assigned)
- region: String
-
Postal address - region.
- state: int
-
Current object state. One of: Node State, Cluster State, Sensor State
- status: int
-
Current object status.
- streetAddress: String
-
Postal address - street.
- timeZone: String
-
Effective time zone name (IANA name, e.g.
Europe/Riga). Time zone is inherited from parent objects if not set on this object directly.nullif time zone is not set. Use setTimeZone() to change.
- timeZoneRule: String
-
POSIX TZ rule string of the effective time zone (e.g.
EET-2EEST,M3.5.0/3,M10.5.0/4). Time zone is inherited from parent objects if not set on this object directly.nullif time zone is not set.
- type: int
- templates: Array
-
Returns array of templates (Template) applied on this object. Only templates the script has read access to are included. Return value also affected by trusted nodes settings.
// Log names and ids of all accessible templates for current node templates = $node.templates; for (t : templates) { trace(1, "Template object: name='" .. t.name .. "' id=" .. t.id); }
- agentCertificateFingerprint: String
-
SHA-256 fingerprint of the agent’s TLS certificate pinned for this node, as hexadecimal string. The fingerprint is pinned on the first successful TLS connection to the agent, or set in node properties. Empty string if no fingerprint is pinned.
- agentCertificateMappingData: String
-
Agent certificate mapping data (set in object properties).
- agentCertificateMappingMethod: int
-
Agent certificate mapping method (set in object properties):
0- by subject,1- by public key,2- by common name,3- by template ID.
- agentCertificateSubject: String
-
Subject of certificate issued for agent tunnel on this node.
- agentId: String
-
NetXMS agent unique ID (
stringrepresentation of GUID). Will return all zeroes GUID if agent is not detected on node or does not have unique ID.
- agentPlatformName: String
-
Platform name of the NetXMS agent build running on this node (value of agent’s
System.PlatformNamemetric). May differ from platformName, for example when a 32-bit agent runs on a 64-bit system.
- agentProxy ⇒ Node
-
Object that is set as agent proxy in object properties or NULL.
- agentTlsMode: int
-
TLS mode configured for direct agent connections:
-
0: TLS disabled
-
1: TLS allowed (used if supported by agent)
-
2: TLS required
-
- agentVersion: String
-
NetXMS agent version as
string.
- bootTime: int64
-
UNIX time (number of seconds since epoch) of the moment when node was started or
0if unknown.
- bridgeBaseAddress: String
-
Base bridge MAC address of the switch in colon-separated notation (e.g.
00:1A:2B:3C:4D:5E). Value is only valid for bridges and switches. Empty string or all zeroes (00:00:00:00:00:00) indicates that address is unknown.
- capabilities: int
-
Detected node capabilities ("Have Agent", "Support SNMP", etc.) Bitwise OR of node capability constants.
- cipDeviceType: int
-
EtherNet/IP device type
- cipDeviceTypeAsText: String
-
EtherNet/IP device type as text
- cipExtendedStatus: int
-
EtherNet/IP device extended status
- cipExtendedStatusAsText: String
-
EtherNet/IP device extended status as text
- cipState: int
-
EtherNet/IP device state
- cipStateAsText: String
-
EtherNet/IP device state as text
- cipStatus: int
-
EtherNet/IP device status
- cipStatusAsText: String
-
EtherNet/IP device status as text
- cipVendorCode: int
-
EtherNet/IP vendor code in numeric form.
- cluster ⇒ Cluster
-
Cluster this node is in.
- componentAssets: Array
-
Array of Asset objects linked to components of this node (see componentSerial). The asset linked to the node itself is available via
assetattribute and is not included. Assets the script has no read access to are skipped.for (a : $node.componentAssets) println(a.name .. " -> component " .. a.componentSerial);
- dependentNodes: Array
-
Will return array with NodeDependency class objects. This array contains all objects that have current node as a proxy or data collection sources.
- downSince: int64
-
UNIX timestamp when node went down.
- driver: String
-
Name of the network device driver selected for the node.
- expectedCapabilities: int
-
Expected capabilities bitmask for the node. Capabilities set in this mask are protected from automatic removal when protocols become temporarily unreachable. Bitwise OR of node capability constants. See setExpectedCapabilities().
Added in version 5.2
- effectiveAgentProxy ⇒ Node
-
Object that is effective agent proxy or NULL.
- effectiveIcmpProxy ⇒ Node
-
Object that is effective ICMP proxy or NULL.
- effectiveSnmpProxy ⇒ Node
-
Object that is effective SNMP proxy or NULL.
- etherNetIPAddress ⇒ InetAddress
-
Effective address used for EtherNet/IP communication: EtherNet/IP address configured in node properties, or node’s primary IP address if not configured.
- flags: int
-
Bit mask of Node flags.
- hardwareComponents: Array
-
Returns an array of available hardware of class HardwareComponent.
- hardwareId: String
-
Nodes' unique hardware id
- hasAgentIfXCounters: bool
-
TRUEif agent supports 64-bit interface counters.
- hasEntityMIB: bool
-
TRUEif supports ENTITY-MIB.
- hasServiceManager: bool
-
TRUEif node has service manager accessible via NetXMS agent.
- hasIfXTable: bool
-
TRUEif supports ifXTable via SNMP (64-bit counters for interface statistics).
- hasUserAgent: bool
-
TRUEif has user agent
- hasVLANs: bool
-
TRUEif VLAN information available.
- hasWinPDH: bool
-
TRUEif node supports Windows PDH parameters.
- hypervisorInfo: String
-
Additional information about hypervisor for this node.
- hypervisorType: String
-
Hypervisor type as
string(usually hypervisor vendor or product name, like VMWare or XEN).
- icmpAverageRTT: String
-
ICMP average response time for primary address in milliseconds, as a numeric string. Will return null if no information.
- icmpLastRTT: String
-
ICMP last response time for primary address in milliseconds, as a numeric string. Will return null if no information.
- icmpMaxRTT: String
-
ICMP maximal response time for primary address in milliseconds, as a numeric string. Will return null if no information.
- icmpMinRTT: String
-
ICMP minimal response time for primary address in milliseconds, as a numeric string. Will return null if no information.
- icmpPacketLoss: String
-
ICMP packet loss for primary address in percent, as a numeric string. Will return null if no information.
- icmpProxy ⇒ Node
-
Object that is set as ICMP proxy in object properties or NULL.
- interfaces: Array
-
Array with Interface objects, that are under this node. First object placed at index 0. Only interfaces the script has read access to are included.
- is802_1x: bool
-
TRUEif node supports 802.1x. Equivalent ofisPAE.
- isAgent: bool
-
TRUEif NetXMS agent detected on node
- isAgentRestartPending: bool
-
TRUEif NetXMS agent on this node reported that its restart is pending (for example, after its configuration file or an agent configuration policy was changed). Checked during status poll.
- isBridge: bool
-
TRUEif node is a bridge
- isCDP: bool
-
TRUEif node supports CDP (Cisco Discovery Protocol)
- isDecommissioned: bool
-
TRUEif node is decommissioned.
- isEtherNetIP: bool
-
TRUEif node supports EtherNet/IP (Industrial Protocol)
- isExternalGateway: bool
-
TRUEif node is an external gateway (remotely managed node). Alias:isRemotelyManaged.
- isLLDP: bool
-
TRUEif node supports LLDP (Link Layer Discovery Protocol)
- isLocalManagement: bool
-
TRUEif node is a local management server (NetXMS server)
- isLocalMgmt: bool
-
TRUEif node is a local management server (NetXMS server)
- isModbusTCP: bool
-
TRUEif node supports Modbus TCP
- isNativeAgent: bool
-
TRUEif NetXMS agent detected on node. Equivalent ofisAgent.
- isNDP: bool
-
TRUEif node supports SONMP/NDP (Synoptics/Nortel Discovery Protocol). Equivalent ofisSONMP.
- isNETCONF: bool
-
TRUEif node supports NETCONF protocol.
- isObserved: bool
-
TRUEif this node is matched as a host by at least one ObservationPoint of a TrafficObserver.
- isOSPF: bool
-
TRUEif node supports OSPF.
- isPAE: bool
-
TRUEif node supports 802.1x. Equivalent ofis802_1x.
- isPrinter: bool
-
TRUEif node is a printer
- isProfiNet: bool
-
TRUEif node supports PROFINET (Process Field Network)
- isRouter: bool
-
TRUEif node is a router (has IP forwarding enabled)
- isSMCLP: bool
-
TRUEif node supports SMCLP (Server Management Command Line Protocol)
- isSNMP: bool
-
TRUEif SNMP agent detected on node
- isSONMP: bool
-
TRUEif node supports SONMP/NDP (Synoptics/Nortel Discovery Protocol)
- isSSH: bool
-
TRUEif SSH is connection available
- isSSHCommandChannelAvailable: bool
-
TRUEif SSH command channel can be established to this node.
- isSSHInteractiveChannelAvailable: bool
-
TRUEif SSH interactive (shell) channel can be established to this node.
- isSTP: bool
-
TRUEif node supports STP (Spanning Tree Protocol)
- isVirtual: bool
-
TRUEif node is virtual
- isVRRP: bool
-
TRUEif VRRP supported.
- isWirelessAP: bool
-
TRUEif node is wireless access point
- isWirelessController: bool
-
TRUEif node is wireless controller
- lastAgentCommTime: int
-
Unix timestamp of last time when communication with agent was
- modbusProxy ⇒ Node
-
MODBUS proxy object
- modbusProxyId: int
-
MODBUS proxy object id
- modbusTCPPort: int
-
MODBUS TCP port
- modbusUnitId: int
-
MODBUS unit id
- netconfCapabilities: Array
-
NETCONF capabilities announced by the device during last configuration poll, as array of capability URI strings. Empty array if node does not support NETCONF.
- netconfPort: int
-
TCP port used for NETCONF connections.
- netconfProxy ⇒ Node
-
Object that is set as NETCONF proxy in node properties or
null.
- netconfProxyId: int
-
ID of the object that is set as NETCONF proxy in node properties, or
0if not set.
- networkPathCheckResult ⇒ NetworkPathCheckResult
-
Node network path
- nodeSubType: String
-
Node sub type
- nodeType: int
-
Node type Node types
- observationPoints: Array
-
Array of ObservationPoint objects at which this node was observed. Empty array if the node is not observed.
- ospfAreas: Array
-
Array with OSPFArea class objects (
nullif node does not support OSPF)
- ospfNeighbors: Array
-
Array with OSPFNeighbor class objects (
nullif node does not support OSPF)
- ospfRouterId: String
-
OSPF router ID (
nullif node does not support OSPF)
- physicalContainerId: int
-
Physical container object id (Rack or Chassis)
- platformName: String
-
Platform name reported by NetXMS agent
- pollCountForStatusChange: int
-
Number of polls required before registering a status change.
- primaryHostName: String
-
Primary host name
- productCode: String
-
Hardware system property - product code
- productName: String
-
Hardware system property - product name
- productVersion: String
-
Hardware system property - product version
- rackHeight: int
-
Object height in rack
- rackId: int
-
Will return Rack id if node is added in rack, otherwise
0
- rackPosition: int
-
Object position in rack
- runtimeFlags: int
-
Bit mask of Node runtime flags,
uint32.
- serialNumber: String
-
Serial number from hardware system property
- snmpAgentNames: Array
-
Names of additional SNMP agents configured on this node, as array of strings. Use createSNMPTransportForAgent() to communicate with a specific additional agent.
- snmpOID: String
-
SNMP object identifier (result of
1.3.6.1.2.1.1.2.0request)
- snmpProxy ⇒ Node
-
Object that is set as SNMP proxy in object properties or NULL.
- snmpProxyId: int
-
SNMP proxy object id.
- snmpSysContact: String
-
SNMP system contact (result of
1.3.6.1.2.1.1.4.0request)
- snmpSysLocation: String
-
SNMP system location (result of
1.3.6.1.2.1.1.6.0request)
- snmpSysName: String
-
SNMP system name (result of
1.3.6.1.2.1.1.5.0request)
- snmpVersion: int
-
Configured SNMP version:
-
0: SNMP version 1
-
1: SNMP version 2c
-
3: SNMP version 3
-
- softwarePackages: Array
-
Returns array of SoftwarePackage class objects
- sysDescription: String
-
System description (value of
System.Unamefor nodes with agents or1.3.6.1.2.1.1.1.0for SNMP nodes)
- tunnel ⇒ Tunnel
-
Tunnel object f this node or NULL if there is no tunnel active and bound to this node.
- vendor: String
-
Hardware vendor information
- vlans: Array
-
Array with object VLAN objects (
nullif there are no VLANs)
- wirelessDomain ⇒ WirelessDomain
-
Wireless domain of this node
- wirelessDomainId: int
-
Wireless domain id of this node
- wirelessStations: Array
-
Array with object WirelessStation objects (
nullif node is neither wireless access point nor wireless controller)
- zoneProxyAssignments: int
-
Number of objects where this node is selected as either primary or backup zone proxy (
0if zoning is disabled or this node is not a zone proxy).
- zoneProxyStatus: bool
-
Status of this node as zone proxy (
trueif active).0if zoning is disabled or this node is not a zone proxy.
- zoneUIN: int
-
This node zone UIN
Instance methods
- bind(childObject): bool
-
Bind
childObjectto the current object as a child.Table 1. Parameters childObject
Object to bind as a child to the current object.
Returntrueif the objects were linked;falseif the link is refused because deletion of either object has started, or the script lacks modify access to the current object. Invalid object types, incompatible bindings and bindings that would create a loop cause a runtime error.
- bindTo(parentObject): bool
-
Bind current object to
parentObjectas a child.Table 2. Parameters parentObject
Object to bind as a parent to the current object.
Returntrueif the objects were linked;falseif the link is refused because deletion of either object has started, or the script lacks modify access to the current object. Invalid object types, incompatible bindings and bindings that would create a loop cause a runtime error.
- calculateDowntime(tag, periodStart, periodEnd): Array
-
Calculate node downtime
Table 3. Parameters tag
String
downtime tag
periodStart
Integer
Unix timestamp of the period start
periodEnd
Integer
Unix timestamp of the period end
ReturnArray of DowntimeInfo objects, or
nullif no downtime was recorded for the tag in the period.
- clearGeoLocation(): void
-
Clears GeoLocation data from the node
- createUserAgentNotification(message, startTime, endTime, showOnStartup=false): int
-
Send a User Support Application notification to the nodes at or below this object. Set
startTimeandendTimeto0for an instant notification. See User Support Application Notifications.Table 4. Parameters message
String
message to be sent
startTime
Integer
start time of message delivery (UNIX timestamp)
endTime
Integer
end time of message delivery (UNIX timestamp)
showOnStartup
Boolean
TRUEto show message on startup (optional, defaults to false)ReturnMessage id, or
nullif the script’s security context lacks the Manage user support application notifications system right.
- delete(): void
-
Deletes current object.
- deleteCustomAttribute(name): String
-
Delete custom attribute.
Table 5. Parameters name
String
Name of the attribute to delete.
ReturnPrevious value of the attribute, or
nullif it did not exist. Stored values"true"and"false"are returned as boolean, structured values as hash map or array.falseis also returned if the script has no modify access to the object (see access check), so it is ambiguous; read the attribute back to check whether it was deleted. For attribute names starting with$$the method returnsnulland does not delete anything.
- enterMaintenance([comment]): void
-
Enable maintenance mode for the object.
Table 6. Parameters comment
String
Optional. Maintenance comment, recorded with the maintenance mode change.
- expandString(string): String
-
Expand string by replacing macros with their values.
Table 7. Parameters string
String
String to expand
ReturnFormated string
>>> $node.expandString("%n") My node name
- forceAutobindPoll(): bool
-
Schedule forced autobind poll for this object. The poll is executed asynchronously on the poller thread pool; the method returns immediately after scheduling.
ReturnTRUEif the poll was scheduled,FALSEif the caller has no modify access to the object or autobind poll is not applicable to this object type.
- forceConfigurationPoll(): bool
-
Schedule forced configuration poll for this object. The poll is executed asynchronously on the poller thread pool; the method returns immediately after scheduling.
ReturnTRUEif the poll was scheduled,FALSEif the caller has no modify access to the object or configuration poll is not applicable to this object type.// Re-read node configuration after changing its SNMP settings $node.setSNMPCommunity("public"); if (!$node.forceConfigurationPoll()) println("Cannot schedule configuration poll");
- forceDiscoveryPoll(): bool
-
Schedule forced network discovery poll for this object. The poll is executed asynchronously on the poller thread pool; the method returns immediately after scheduling.
ReturnTRUEif the poll was scheduled,FALSEif the caller has no modify access to the object or network discovery poll is not applicable to this object type.
- forceInstanceDiscoveryPoll(): bool
-
Schedule forced instance discovery poll for this object. The poll is executed asynchronously on the poller thread pool; the method returns immediately after scheduling.
ReturnTRUEif the poll was scheduled,FALSEif the caller has no modify access to the object or instance discovery poll is not applicable to this object type.
- forceMapUpdatePoll(): bool
-
Schedule forced map update poll for this object. The poll is executed asynchronously on the poller thread pool; the method returns immediately after scheduling.
ReturnTRUEif the poll was scheduled,FALSEif the caller has no modify access to the object or map update poll is not applicable to this object type.
- forceRoutingTablePoll(): bool
-
Schedule forced routing table poll for this object. The poll is executed asynchronously on the poller thread pool; the method returns immediately after scheduling.
ReturnTRUEif the poll was scheduled,FALSEif the caller has no modify access to the object or routing table poll is not applicable to this object type.
- forceStatusPoll(): bool
-
Schedule forced status poll for this object. The poll is executed asynchronously on the poller thread pool; the method returns immediately after scheduling.
ReturnTRUEif the poll was scheduled,FALSEif the caller has no modify access to the object or status poll is not applicable to this object type.
- forceTopologyPoll(): bool
-
Schedule forced topology poll for this object. The poll is executed asynchronously on the poller thread pool; the method returns immediately after scheduling.
ReturnTRUEif the poll was scheduled,FALSEif the caller has no modify access to the object or topology poll is not applicable to this object type.
- getCustomAttribute(name): String
-
Returns value of the custom attribute with the provided name.
Table 8. Parameters name
String
Name of the attribute to get value from.
ReturnAttribute value, or
nullif the attribute does not exist. Stored values"true"and"false"are returned as boolean, structured values as hash map or array. Names starting with$$always returnnull.Alternatively, attributes can be accessed as instance attribues (with
., attribute should exist) or by usingattribute@objectnotion (which will returnnullinstead of runtime error if attribue is missing).
- getResponsibleUsers(tag) ⇒ array
-
Returns list of responsible users with specific tag. Full list is acceessible via .responsibleUsers
List of allowed tags are controlled by server configuration variable
Objects.ResponsibleUsers.AllowedTags.Table 9. Parameters tag
String
Tag.
nullreturns all responsible users, same as.responsibleUsers.ReturnArray with user objects that are added as responsible users for this object. Objects are User or UserGroup
This function return empty list if no users or groups are found for the tag.
- isChild(object): bool
-
If provided object is child of this object
Table 10. Parameters object
Object to check
ReturnTRUE if provided object is child of this object
- isDirectChild(object): bool
-
If provided object is direct child of this object
Table 11. Parameters object
Object to check
ReturnTRUE if provided object is direct child of this object
- isDirectParent(object): bool
-
If provided object is direct parent of this object
Table 12. Parameters object
Object to check
ReturnTRUE if provided object is direct parent of this object
- isParent(object): bool
-
If provided object is parent of this object
Table 13. Parameters object
Object to check
ReturnTRUE if provided object is parent of this object
- leaveMaintenance(): void
-
Disable maintenance mode for the object.
- manage(): void
-
Sets object to managed state. Has no affect if object already managed. Returns
falseand does not change the state if the object is a decommissioned node.
- readMaintenanceJournal([startTime], [endTime]): Array
-
Read maintenance entries
Table 14. Parameters startTime
Integer
Optional. Period start as UNIX timestamp.
0or omitted means no lower bound.endTime
Integer
Optional. Period end as UNIX timestamp.
0or omitted means no upper bound.ReturnArray with MaintenanceJournalRecord objects, or
nullon database error
- rename(name): void
-
Rename object.
Table 15. Parameters name
String
New object name
- setAlias(name): void
-
Set object alias name
Table 16. Parameters name
String
New alias name
- setCategory(idOrName): bool
-
Set object category id or name (used to get object display image)
Table 17. Parameters idOrName
String
ID or name of category
ReturnTRUEon success,FALSEif the category is not found or the caller has no modify access to the object.
- setComments(comment, [isMarkdown]): void
-
Set object comments
Table 18. Parameters comment
String
Comment to be set
isMarkdown
Boolean
Optional second argument ( v 5.1.2 ). If it is logical "true", Markdown indicator will be added if not present already; if it is logical "false" (but not NULL), Markdown indicator will be removed if present; if it is NULL or omitted, comment will be set as is (retaining existing behavior).
- setCustomAttribute(key, value, [inherit]): String
-
Update or create custom attribute with the given key and value.
Table 19. Parameters key
String
Attribute key
value
String
Attribute value. Hash map, array, JsonObject or JsonArray is stored as structured (JSON) value.
inherit
Boolean
Optional parameter. If not set - inheritance will not be changed.
trueto inherit,falsenot to inherit.ReturnPrevious value of the attribute, or
nullif it did not exist. Stored values"true"and"false"are returned as boolean, structured values as hash map or array.falseis also returned if the script has no modify access to the object (see access check), so it is ambiguous; read the attribute back to check whether it was set. For attribute names starting with$$the method returnsfalseand does not set anything.$node.setCustomAttribute("location", "Rack 12"); if ($node.getCustomAttribute("location") != "Rack 12") println("Cannot set custom attribute");
- setGeoLocation(newLocation): void
-
Sets node geographical location.
Table 20. Parameters newLocation
- setMapImage(image): bool
-
Sets object image, that will be used to display object on network map
Table 21. Parameters image
String
GUID or name of image from image library.
nullor all-zero GUID resets the image.ReturnTRUEon success,FALSEif the image is not found in image library or the caller has no modify access to the object.
- setNameOnMap(name): void
-
Sets object’s name, that will be used to display object on network map
Table 22. Parameters name
String
New object’s name on map
- setPostalAddress(country, region, city, district, streetAddress, postcode): void
-
Sets object’s postal address. Each argument must be a string or
null. Anullor empty value clears the corresponding field.Table 23. Parameters country
String
Country.
nullor empty to clear.region
String
Region.
nullor empty to clear.city
String
City.
nullor empty to clear.district
String
District.
nullor empty to clear.streetAddress
String
Street address.
nullor empty to clear.postcode
String
Postal code.
nullor empty to clear.
- setStatusCalculation(type, …): int
-
Sets status calculation method.
Table 24. Parameters type
Integer
Status calculation type. One of status calculation types
…
Integer(s)
If single threshold or multiple thresholds type is selected, then threshold or thresholds in percentage should be provided as next parameters.
Return1on success,0iftypeis not a valid status calculation type.falseif the caller has no modify access to the object.
- setStatusPropagation(type, …): int
-
Sets status propagation method.
Table 25. Parameters type
Integer
Status propagation type. One of status propagation types
…
Integer(s)
For fixed value type - value (object status) should be provided. For relative - offset should be provided. For translated - status mapping should be provided (4 numbers: object status to propagate for Warning, Minor, Major and Critical).
Return1on success,0iftypeis not a valid status propagation type.falseif the caller has no modify access to the object.
- setTimeZone(name, [rule]): bool
-
Set object’s time zone. Time zone is inherited by child objects that do not have their own setting. Passing
nullor empty string asnameremoves object’s own setting; time zone inherited from parent objects, if any, stays in effect.Table 26. Parameters name
String
IANA time zone name (e.g.
Europe/Riga).nullor empty to remove object’s own setting.rule
String
Optional POSIX TZ rule string (e.g.
EET-2EEST,M3.5.0/3,M10.5.0/4). If omitted, the rule is resolved fromnameusing the server’s system time zone database; must be provided if the server cannot resolve the name.ReturnTRUEon success,FALSEif the caller has no modify access to the object, the name is malformed, the rule cannot be parsed, or the name cannot be resolved.$node.setTimeZone("Europe/Riga"); println($node.timeZone); // Europe/Riga println($node.timeZoneRule); // EET-2EEST,M3.5.0/3,M10.5.0/4 $node.setTimeZone(null); // revert to time zone inherited from parents
- unbind(object): void
-
Unbind provided object from the current object.
Table 27. Parameters object
Object to unbind from the current object.
- unbindFrom(object): void
-
Unbind current object from the provided object.
Table 28. Parameters object
Object to unbind from the current object.
- unmanage(): void
-
Set object into unmanaged state. Has no effect if object is already in unmanaged state.
- writeMaintenanceJournal(description): bool
-
Add entry to maintenance journal
Table 29. Parameters description
String
Message to be added
ReturnTRUEif the entry was added,FALSEon failure or if the caller has no maintenance access to the object.
- applyTemplate(template): bool
-
Apply template to this object.
Table 30. Parameters template
Template object to apply
Returntrueif template was applied,falseif a template from the same exclusion group is already applied to this object or the caller has no modify access to the object.
- createDCI(origin, name, description, dataType, [pollingInterval], [retentionTime]) ⇒ DCI
-
Create a new data collection item on this object.
Table 31. Parameters origin
String or Integer
Data origin. Possible values:
"internal","agent","snmp","websvc","push","winperf","smclp","script","ssh","mqtt","driver","modbus","ethernetip"(case-insensitive). Alternatively, you can use Data origin constants.name
String
Name of the metric (e.g.
"Agent.Version").description
String
Human readable description.
dataType
String or Integer
Type of the collected data. Possible values:
"int32","uint32","int64","uint64","counter32","counter64","float","string". Alternatively, you can use DCI data type constants.pollingInterval
String
Polling interval in seconds, or
nullor"0"for server-default value. Optional.retentionTime
String
Retention time in days,
"0"for "Do not save collected data to database", ornullfor server-default value. Optional.ReturnNewly created DCI object, or
nullif origin or data type is invalid or the caller has no modify access to the object.dci = $node.createDCI("agent", "Agent.Version", "Agent Version", "string"); println(dci.id);
- deleteDCI(dciId): bool
-
Delete data collection item from this object. DCIs created from a template are managed by that template and cannot be deleted this way.
Table 32. Parameters dciId
Integer
DCI ID.
Returntrueon success,falseon failure (caller has no modify access to the object, DCI not found, or DCI was created from a template).dci = $node.findDCIByName("Temporary.Metric"); if (dci != null) $node.deleteDCI(dci.id);
- enableConfigurationPolling(flag): void
-
Enable or disable configuration polling.
Table 33. Parameters flag
Boolean
If configuration polling should be enabled.
- enableDataCollection(flag): void
-
Enable or disable data collection polling.
Table 34. Parameters flag
Boolean
If data collection polls should be enabled.
- enableStatusPolling(flag): void
-
Enable or disable status polling.
Table 35. Parameters flag
Boolean
If status polls should be enabled.
- findAllDCIs(name, description, tag, relatedObject): Array
-
Find all DCIs on this object matching the given filters. All parameters are optional; omitted or
nullparameters are not used for filtering. Name, description, and tag filters support glob patterns (?and*) and are case-insensitive.Table 36. Parameters name
String
Name filter (glob pattern). Optional.
description
String
Description filter (glob pattern). Optional.
tag
String
User tag filter (glob pattern). Optional.
relatedObject
NetObj or Integer
Related object or object ID. Optional.
ReturnArray of DCI objects matching the filters.
// Find all CPU-related DCIs for (d : $node.findAllDCIs("System.CPU.*")) println(d.name .. " = " .. d.cachedValue);
- findDCIByName(name) ⇒ DCI
-
Find a DCI on this object by metric name (exact case-insensitive match).
Table 39. Parameters name
String
Metric name of the DCI.
ReturnDCI object or
nullif not found.dci = $node.findDCIByName("System.CPU.Usage"); if (dci != null) println("CPU Usage: " .. dci.cachedValue);
- pushDCIData(dciId, value, [timestamp]): bool
-
Push a new value to a DCI from script. The DCI must be a single value DCI with origin set to "Push" or "OpenTelemetry (OTLP)".
Table 42. Parameters dciId
Integer
DCI ID.
value
String
New value for the DCI.
timestamp
Integer
Timestamp in milliseconds since epoch (1 Jan 1970 00:00:00 UTC). Optional, current time is used if not specified.
Returntrueon success,falseon failure (DCI not found, wrong origin, not a single value DCI, or value was not accepted).dci = $node.findDCIByName("My.Push.Metric"); $node.pushDCIData(dci.id, "42");
- readInternalParameter(name): String
-
Reads object internal metric (metric with source "Internal").
Table 43. Parameters name
String
Metric name.
ReturnMetric value, or
nullif the metric cannot be read.
- removeTemplate(template): void
-
Remove template from this object.
Table 44. Parameters template
Template object to remove
- callWebService(webSvcName, requestType, …) ⇒ WebServiceResponse
-
Finds web service by name, makes request and returns the WebServiceResponse object.
Table 45. Parameters webSvcName
String
Web service name.
requestType
String
Request type. One of: GET, DELETE, PATCH, POST, PUT (case-insensitive).
nulluses the request method from the web service definition.data
String, JsonObject or JsonArray
Depending on request type data might be required and provided as a string or JSON object. GET and DELETE requests do not allow data, PATCH, POST, PUT require data;
nulluses the request data from the web service definition.contentType
String
Optional parameter, for PATCH, POST and PUT requests only. Type of provided data that will be set to "Content-Type" header of request. Default type is "application/json".
acceptCached
Boolean
Optional named parameter. If True, response stored in agent’s cache will be used. Default: false.
…
Strings
Optional additional parameter(s) that will be used in web service definition to expand %1, %2… macro.
ReturnInstance of WebServiceResponse with request result. If the web service definition is not found or the request type is invalid, the returned object has
successset tofalseand the reason inerrorMessage.// Valid example when request fails because there is no connection to agent result = $node.callWebService("Web service name", "GET", "additional/ult/path"); println(result.success); // "false" println(result.errorMessage); // "No connection with agent" println(result.agentErrorCode); // "0" println(result.httpResponseCode); // "0" println(result.document); // "" // Successful post request result = $node.callWebService("Web service name", "POST", "{ \"id\":10 }", "application/json", "additional/ult/path"); println(result.success); // "true" println(result.errorMessage); // "" println(result.agentErrorCode); // "0" println(result.httpResponseCode); // "200" println(result.document); // "" // Get requests result = $node.callWebService("Web service name", "GET", "additional", "parameters"); result = $node.callWebService("Web service name", "GET", acceptCached: true, "additional", "parameters");
- clearSNMPTrapCredentials(): bool
-
Remove separate SNMP trap credentials set with setSNMPTrapCommunity() or setSNMPTrapUSMCredentials(). After this call, incoming traps are validated against the node’s polling credentials again.
ReturnTRUEon success,FALSEif caller has no modify access to the node.
- createSNMPTransport(port, community, context, failIfUnreachable) ⇒ SNMPTransport
-
Create SNMP transport object of class SNMPTransport with communication settings defined on the node. It is possible to specify a community string but only community strings listed in Network Credentials will be accepted. Creation of SNMP transport is a preparatory operation enabling subsequent sending of SNMP requests to node. However, creation of SNMP transport does not guarantee that the node is accessible.
Table 46. Parameters port
Integer
Optional parameter with port.
community
String
Optional parameter with community string.
context
String
Optional parameter with context.
failIfUnreachable
Boolean
Optional parameter, if provided and is true, check that SNMP is reachable on the node before creating SNMP transport.
Added in version 4.4.1:
failIfUnreachableparameterReturnInstance of SNMPTransport or
nullif failed, caller has no SNMP read access to the node, or node was not reachable when failIfUnreachable was set to true.
- createSNMPTransportForAgent(name, failIfUnreachable) ⇒ SNMPTransport
-
Create SNMP transport object of class SNMPTransport for an additional SNMP agent configured on this node. Additional agents are selected by name; available names are listed in snmpAgentNames attribute.
Table 47. Parameters name
String
Name of the additional SNMP agent.
failIfUnreachable
Boolean
Optional parameter, if provided and is true, check that node is reachable before creating SNMP transport.
ReturnInstance of SNMPTransport or
nullif agent with given name is not configured, caller has no SNMP read access to the node, or node is unreachable andfailIfUnreachableis true.transport = $node.createSNMPTransportForAgent("ups"); if (transport != null) { v = transport.getValue(".1.3.6.1.2.1.33.1.2.4.0"); // upsEstimatedMinutesRemaining println("Minutes remaining: " .. v); }
- enable8021xStatusPolling(flag): void
-
Enable or disable 802.1x port state checking during status polls.
Table 48. Parameters flag
Boolean
If 802.1x port state checking should be enabled.
- enableAgent(flag): void
-
Enable or disable usage of NetXMS agent for all polls.
Table 49. Parameters flag
Boolean
If agent usage should be enabled.
- enableDiscoveryPolling(flag): void
-
Enable or disable discovery polling.
Table 50. Parameters flag
Boolean
If discovery polling should be enabled.
- enableEtherNetIP(flag): void
-
Enable or disable usage of EtherNet/IP for polls.
Table 51. Parameters flag
Boolean
If EtherNet/IP should be enabled.
- enableIcmp(flag): void
-
Enable or disable usage of ICMP pings for status polls.
Table 52. Parameters flag
Boolean
If ICMP pings should be enabled.
- enableModbusTcp(flag): void
-
Enable or disable usage of Modbus TCP for polls.
Table 53. Parameters flag
Boolean
If Modbus TCP should be enabled.
- enableNetconf(flag): void
-
Enable or disable usage of NETCONF protocol.
Table 54. Parameters flag
Boolean
If NETCONF communication should be enabled.
- enablePrimaryIPPing(flag): void
-
Enable or disable usage of ICMP ping for primary IP.
Table 55. Parameters flag
Boolean
If primary IP ping should be enabled.
- enableRoutingTablePolling(flag): void
-
Enable or disable routing table polling.
Table 56. Parameters flag
Boolean
If routing table polls should be enabled.
- enableSnmp(flag): void
-
Enable or disable usage of SNMP for all polls.
Table 57. Parameters flag
Boolean
If SNMP communication should be enabled.
- enableSmclpPropertyPolling(flag): void
-
Enable or disable reading of SM-CLP available properties metadata during configuration poll.
Table 58. Parameters flag
Boolean
If 802.1x port state checking should be enabled.
- enableSsh(flag): void
-
Enable or disable usage of SSH
Table 59. Parameters flag
Boolean
If SSH communication should be enabled.
- enableTopologyPolling(flag): void
-
Enable or disable topology polling.
Table 60. Parameters flag
Boolean
If topology polls should be enabled.
- enableVnc(flag): void
-
Enable or disable VNC detection on the node during configuration poll.
Table 61. Parameters flag
Boolean
If VNC detection should be enabled.
- enableWinPerfCountersCache(flag): void
-
Enable or disable reading of Windows performance counters metadata during configuration poll.
Table 62. Parameters flag
Boolean
If reading of Windows performance counters metadata should be enabled.
- executeAgentCommand(command, …): bool
-
Execute agent command (action) on node.
Table 63. Parameters command
String
Command to be executed.
…
String
Optional arguments for command
ReturnTrue if command execution is successful or false otherwise (also
falseif caller has no control access to the node).
- executeAgentCommandWithOutput(command, …): String
-
Execute agent command (action) on node and return it’s output.
Table 64. Parameters command
String
Command to be executed.
…
String
Optional arguments for command
ReturnString with output of the command or null on failure or if caller has no control access to the node.
- executeSSHCommand(command) ⇒ array
-
Execute SSH command on node. The command is executed through the node’s effective SSH proxy using SSH credentials from node properties.
Table 65. Parameters command
String
Command to be executed.
ReturnArray of strings with output of the command or null on failure, if no SSH proxy is available, or if caller has no control access to the node.
- getBlockedPorts(protocol): Array
-
Get array of blocked ports for the specified protocol.
Table 66. Parameters protocol
String
Protocol type - "tcp" or "udp"
ReturnArray of integers representing blocked port numbers. Empty array if protocol is neither
"tcp"nor"udp".blockedTcpPorts = $node.getBlockedPorts("tcp"); for (port : blockedTcpPorts) { println("Blocked TCP port: " .. port); }
- getInstalledPackages(filter, useRegex): Array
-
Get array of installed packages on the node.
Table 67. Parameters filter
String
Optional package name filter
useRegex
Boolean
Optional. If TRUE, use regex matching for filter. Default is FALSE
ReturnArray of SoftwarePackage objects.
// Get all packages packages = $node.getInstalledPackages(); // Get packages matching filter packages = $node.getInstalledPackages("netxms", false);
- getInterface(ifIdentifier) ⇒ Interface
-
Get interface object by index, MAC address or name. If name is number method will assume that it is index.
Table 68. Parameters ifIdentifier
Integer or String
Index, MAC address or name of interface.
ReturnInterface object, or
nullif not found or caller has no read access to the interface.println($node.getInterface("00:14:22:04:25:37").name); // Will print "wlp4s0" println($node.getInterface(3).name); // Will print "wlp4s0" println($node.getInterface("wlp4s0").name); // Will print "wlp4s0"
- getInterfaceByMACAddress(ifMACAddr) ⇒ Interface
-
Get interface object by MAC address.
Table 70. Parameters ifMACAddr
String
MAC address of interface.
ReturnInterface object, or
nullif not found or caller has no read access to the interface.println($node.getInterfaceByMACAddress("00:14:22:04:25:37").name); // Will print "wlp4s0"
- getInterfaceName(ifIndex): String
-
Get interface name by index.
Table 72. Parameters ifIndex
Integer
Index of interface.
ReturnInterface object name, or
nullif not found.
- getRunningConfig(): String
-
Retrieve running configuration of the device using its network device driver. Only works if the node’s driver supports configuration backup.
ReturnDevice configuration as string, or
nullif caller has no control access to the node, driver does not support configuration backup, or retrieval failed.config = $node.getRunningConfig(); if (config != null) { f = IO::OpenFile("/var/backup/" .. $node.name .. ".cfg", "w"); if (f != null) { f.write(config); f.close(); } }
- getStartupConfig(): String
-
Retrieve startup configuration of the device using its network device driver. Only works if the node’s driver supports configuration backup.
ReturnDevice configuration as string, or
nullif caller has no control access to the node, driver does not support configuration backup, or retrieval failed.
- isPortBlocked(port, protocol): bool
-
Check if a specific port is blocked for the given protocol.
Table 73. Parameters port
Integer
Port number (1-65535)
protocol
String
Protocol - "tcp" or "udp"
ReturnTRUE if the port is blocked, FALSE otherwise (also for port numbers outside 1-65535 or protocol other than
"tcp"/"udp").if ($node.isPortBlocked(22, "tcp")) { println("SSH port is blocked"); }
- getWebService(webSvcName) ⇒ WebService
-
Get web service object by name.
Table 74. Parameters webSvcName
String
Name of web service definition.
ReturnWebService object, or
nullif web service definition is not found.webSvc = $node.getWebService("webSvcName");
- openNETCONFSession() ⇒ NETCONFSession
-
Open NETCONF session to this node. Operations are executed through the node’s effective NETCONF proxy; see NETCONFSession for details and limitations.
ReturnNETCONFSession object, or
nullif caller has no control access to the node.session = $node.openNETCONFSession(); if (session != null) { hostname = session.get("<system xmlns=\"urn:ietf:params:xml:ns:yang:ietf-system\"><hostname/></system>"); println(hostname); }
- openSSHSession([user], [password], [keyId]) ⇒ SSHSession
-
Open an interactive SSH session to this node.
Table 75. Parameters user
String
Optional SSH login username
password
String
Optional SSH password
keyId
Integer
Optional SSH key identifier
ReturnSSHSession object on success, or NULL on failure (including timeout waiting for the initial prompt) or if caller has no control access to the node.
session = $node.openSSHSession(); if (session != null && session.connected) { output = session.execute("ls -la"); for (line : output) { println(line); } session.close(); }
- readAgentList(name): Array
-
Request agent list directly from agent on given node. Returns array of strings or
NULLif failed or caller has no agent read access to the node.Table 76. Parameters name
String
List name.
- readAgentParameter(name): String
-
Request metric directly from agent on given node. Returns
NULLif failed or caller has no agent read access to the node.Table 77. Parameters name
String
Metric name.
- readDriverParameter(name): String
-
Request driver-specific metric from network device driver (e.g. Rittal). Returns
NULLif failed.Table 79. Parameters name
String
Metric name.
- readWebServiceList(name): Array
-
Read list from node using web service
Table 81. Parameters name
String
Name is expected in form service:path or service(arguments):path
ReturnArray of strings read from web service, or
nullon failure
- readWebServiceParameter(name): String
-
Read from node web service parameter
Table 82. Parameters name
String
Name is expected in form service:path or service(arguments):path
ReturnString with result read from web service, or
nullon failure
- setExpectedCapabilities(capabilities): void
-
Set the expected capabilities for this node. Expected capabilities prevent automatic removal of protocol capability flags when a protocol becomes temporarily unreachable. Normally, if a protocol (e.g., SNMP or agent) fails beyond the capability expiration time, its capability flag is cleared. Setting expected capabilities overrides this behavior, keeping the specified capabilities persistent regardless of connectivity status.
Only the following node capability flags are accepted (other bits are masked out):
-
NodeCapability::Agent(0x0000000002) -
NodeCapability::SNMP(0x0000000001) -
NodeCapability::SSH(0x0000000080) -
NodeCapability::EtherNetIP(0x0000800000) -
NodeCapability::ModbusTCP(0x0001000000)Table 83. Parameters capabilities
Integer
Bitmask of node capability flags.
Returnvoid
// Ensure SNMP and agent capabilities are never automatically removed $node.setExpectedCapabilities(NodeCapability::SNMP | NodeCapability::Agent); // Protect all supported protocol capabilities $node.setExpectedCapabilities( NodeCapability::Agent | NodeCapability::SNMP | NodeCapability::SSH | NodeCapability::EtherNetIP | NodeCapability::ModbusTCP ); // Clear expected capabilities (allow normal automatic removal) $node.setExpectedCapabilities(0);Added in version 5.2
-
- setIfXTableUsageMode(mode): void
-
Set ifXTable usage mode 0 - use default, 1 - enable, 2 - disable. Any other value is treated as 0.
Table 84. Parameters mode
Integer
usage mode
- setPollCountForStatusChange(count): void
-
Set the required number of polls before registering a status change.
Table 85. Parameters count
Integer
Number of polls (must be >= 0; negative values are ignored) or 0 to use system default (server configuration variable
Objects.).PollCountForStatusChange
- setProductCode(code): void
-
Set product code of the node. The next configuration poll replaces the value if the device reports its own hardware information.
Table 86. Parameters code
String
New product code.
- setProductName(name): void
-
Set product name of the node. The next configuration poll replaces the value if the device reports its own hardware information.
Table 87. Parameters name
String
New product name.
- setProductVersion(version): void
-
Set product version of the node. The next configuration poll replaces the value if the device reports its own hardware information.
Table 88. Parameters version
String
New product version.
- setSNMPCommunity(community): bool
-
Set SNMP community string used for polling this node (SNMP version 1 and 2c).
Table 89. Parameters community
String
Community string.
ReturnTRUEon success,FALSEif caller has no modify access to the node.
- setSNMPTrapCommunity(community): bool
-
Set separate community string for validating SNMP traps received from this node (SNMP version 1 and 2c). If not set, traps are validated against polling credentials. Use clearSNMPTrapCredentials() to remove it.
Table 90. Parameters community
String
Community string.
ReturnTRUEon success,FALSEif caller has no modify access to the node.
- setSNMPTrapUSMCredentials(userName, authPassword, privPassword, authMethod, privMethod): bool
-
Set separate SNMP version 3 USM credentials for validating SNMP traps received from this node. If not set, traps are validated against polling credentials. Use clearSNMPTrapCredentials() to remove them.
Table 91. Parameters userName
String
USM user name.
authPassword
String
Authentication password.
privPassword
String
Privacy (encryption) password.
authMethod
String or Integer
Authentication method:
"none","md5","sha1","sha224","sha256","sha384","sha512"(case-insensitive), or numeric value 0-6 in the same order.privMethod
String or Integer
Privacy method:
"none","des","aes-128","aes-192","aes-256"(case-insensitive), or numeric value 0-4 in the same order.ReturnTRUEon success,FALSEif caller has no modify access to the node or authentication or privacy method is invalid.
- setSNMPUSMCredentials(userName, authPassword, privPassword, authMethod, privMethod): bool
-
Set SNMP version 3 USM credentials used for polling this node. Node’s SNMP version is switched to 3.
Table 92. Parameters userName
String
USM user name.
authPassword
String
Authentication password.
privPassword
String
Privacy (encryption) password.
authMethod
String or Integer
Authentication method:
"none","md5","sha1","sha224","sha256","sha384","sha512"(case-insensitive), or numeric value 0-6 in the same order.privMethod
String or Integer
Privacy method:
"none","des","aes-128","aes-192","aes-256"(case-insensitive), or numeric value 0-4 in the same order.ReturnTRUEon success,FALSEif caller has no modify access to the node or authentication or privacy method is invalid.$node.setSNMPUSMCredentials("monitor", "authpass123", "privpass123", "sha256", "aes-128"); $node.forceConfigurationPoll();
- setSNMPVersion(version): bool
-
Set SNMP version used for polling this node.
Table 93. Parameters version
String
SNMP version:
"1","2c", or"3"(case-sensitive).ReturnTRUEon success,FALSEif caller has no modify access to the node or version string is not recognized.$node.setSNMPVersion("2c"); $node.setSNMPCommunity("public");
- setSerialNumber(serialNumber): void
-
Set serial number of the node. The next configuration poll replaces the value if the device reports its own hardware information.
Table 94. Parameters serialNumber
String
New serial number.
- setVNCPassword(password): bool
-
Set password used for VNC connections to this node.
Table 95. Parameters password
String
VNC password.
ReturnTRUEon success,FALSEif caller has no modify access to the node.
- setVendor(vendor): void
-
Set vendor of the node. The next configuration poll replaces the value if the device reports its own hardware information.
Table 96. Parameters vendor
String
New vendor name.
// Fill hardware information from custom attributes populated by an external inventory system vendor = $node.getCustomAttribute("inv.vendor"); if (vendor != null) { $node.setVendor(vendor); $node.setProductName($node.getCustomAttribute("inv.model")); $node.setSerialNumber($node.getCustomAttribute("inv.serial")); }
- traceL2Path(destination) ⇒ NetworkPath
-
Trace layer 2 path from this node to the destination node using layer 2 peer information and switch forwarding databases (MAC address tables) collected by the server. No requests are sent to devices.
Table 97. Parameters destination
Destination node.
ReturnNetworkPath object, or
nullif caller has no read access to the destination node. If the destination cannot be reached, the returned path is incomplete; check its isComplete attribute.path = $node.traceL2Path(FindObject("core-sw1")); if ((path != null) && path.isComplete) { for (hop : path.hops) { if (hop.type == "L2_LINK") println(hop.node.name .. " via " .. hop.name); } }
- traceRoute(destination) ⇒ NetworkPath
-
Trace layer 3 path from this node to the destination node using routing tables collected by the server. No requests are sent to devices.
Table 98. Parameters destination
Destination node.
ReturnNetworkPath object, or
nullif caller has no read access to the destination node. If the destination cannot be reached, the returned path is incomplete; check its isComplete attribute.path = $node.traceRoute(FindObject("core-router")); if (path != null) { for (hop : path.hops) println(hop); }
- wakeUp(): bool
-
Send Wake-on-LAN magic packet to this node. Interfaces with IPv4 address are tried in order until magic packet is sent successfully; interfaces that are not unmanaged are tried first, then unmanaged ones. See Interface::wakeUp() for details on how the packet is sent.
ReturnTRUEif magic packet was sent through at least one interface,FALSEif no suitable interface was found, packet cannot be sent, or caller has no control access to the node.// Action script: wake up node that went down if (!$node.wakeUp()) println("Cannot send WoL packet to " .. $node.name);
Constants
| Description | Value |
|---|---|
DCF_DISABLE_STATUS_POLL |
0x00000001 |
DCF_DISABLE_CONF_POLL |
0x00000002 |
DCF_DISABLE_DATA_COLLECT |
0x00000004 |
DCF_LOCATION_CHANGE_EVENT |
0x00000008 |
NF_DISABLE_NETCONF |
0x00002000 |
NF_DISABLE_SMCLP_PROPERTIES |
0x00004000 |
NF_DISABLE_VNC |
0x00008000 |
NF_EXTERNAL_GATEWAY |
0x00010000 |
NF_DISABLE_DISCOVERY_POLL |
0x00020000 |
NF_DISABLE_TOPOLOGY_POLL |
0x00040000 |
NF_DISABLE_SNMP |
0x00080000 |
NF_DISABLE_NXCP |
0x00100000 |
NF_DISABLE_ICMP |
0x00200000 |
NF_FORCE_ENCRYPTION |
0x00400000 |
NF_DISABLE_ROUTE_POLL |
0x00800000 |
NF_AGENT_OVER_TUNNEL_ONLY |
0x01000000 |
NF_SNMP_SETTINGS_LOCKED |
0x02000000 |
NF_PING_PRIMARY_IP |
0x04000000 |
NF_DISABLE_ETHERNET_IP |
0x08000000 |
NF_DISABLE_PERF_COUNT |
0x10000000 |
NF_DISABLE_8021X_STATUS_POLL |
0x20000000 |
NF_DISABLE_SSH |
0x40000000 |
NF_DISABLE_MODBUS_TCP |
0x80000000 |
| Description | Value |
|---|---|
ODF_FORCE_STATUS_POLL |
0x00000001 |
ODF_FORCE_CONFIGURATION_POLL |
0x00000002 |
ODF_CONFIGURATION_POLL_PASSED |
0x00000004 |
ODF_CONFIGURATION_POLL_PENDING |
0x00000008 |
ODF_HAS_IDATA_V5_TABLE |
0x00000010 |
ODF_HAS_TDATA_V5_TABLE |
0x00000020 |
ODF_HAS_IDATA_1H_TABLE |
0x00000040 |
ODF_HAS_IDATA_1D_TABLE |
0x00000080 |
NDF_RECHECK_CAPABILITIES |
0x00010000 |
NDF_NEW_TUNNEL_BIND |
0x00020000 |
Node capability flags are available as node capability named constants.
| Constant | Value | Description |
|---|---|---|
NodeCapability::SNMP |
0x0000000001 |
Node supports SNMP |
NodeCapability::Agent |
0x0000000002 |
NetXMS agent detected on the node |
NodeCapability::Bridge |
0x0000000004 |
Node is a network bridge |
NodeCapability::Router |
0x0000000008 |
Node is an IP router |
NodeCapability::LocalManagement |
0x0000000010 |
Node is management server (NetXMS server itself) |
NodeCapability::Printer |
0x0000000020 |
Node is a printer |
NodeCapability::OSPF |
0x0000000040 |
Node supports OSPF |
NodeCapability::SSH |
0x0000000080 |
SSH support |
NodeCapability::CDP |
0x0000000100 |
Cisco Discovery Protocol supported |
NodeCapability::NDP |
0x0000000200 |
NDP (SONMP) support detected (Nortel/Synoptics/Bay Networks topology discovery) |
NodeCapability::LLDP |
0x0000000400 |
Node supports LLDP |
NodeCapability::VRRP |
0x0000000800 |
Node supports VRRP |
NodeCapability::VLAN |
0x0000001000 |
VLAN information available on the node |
NodeCapability::IEEE802_1x |
0x0000002000 |
802.1x support detected |
NodeCapability::STP |
0x0000004000 |
Spanning Tree (IEEE 802.1d) enabled on node |
NodeCapability::EntityMIB |
0x0000008000 |
Node supports ENTITY-MIB |
NodeCapability::IfXTable |
0x0000010000 |
Node supports ifXTable via SNMP (64-bit interface counters) |
NodeCapability::AgentIfXCounters |
0x0000020000 |
Agent supports 64-bit interface counters |
NodeCapability::WindowsPDH |
0x0000040000 |
Node supports Windows PDH parameters |
NodeCapability::WiFiController |
0x0000080000 |
Node is wireless network controller |
NodeCapability::SMCLP |
0x0000100000 |
Node supports SMCLP protocol |
NodeCapability::NewPolicyTypes |
0x0000200000 |
Agent upgraded to new policy type |
NodeCapability::UserAgent |
0x0000400000 |
User agent (desktop support app) is installed |
NodeCapability::EtherNetIP |
0x0000800000 |
EtherNet/IP support |
NodeCapability::ModbusTCP |
0x0001000000 |
Modbus TCP support |
NodeCapability::ProfiNet |
0x0002000000 |
PROFINET support |
NodeCapability::FileManager |
0x0004000000 |
Node has file manager support |
NodeCapability::LLDPv2 |
0x0008000000 |
LLDP v2 MIB support |
NodeCapability::EmulatedEntityMIB |
0x0010000000 |
ENTITY MIB support emulated by driver |
NodeCapability::DeviceView |
0x0020000000 |
Device view is supported |
NodeCapability::WiFiAccessPoint |
0x0040000000 |
Node is wireless access point |
NodeCapability::VNC |
0x0080000000 |
Node supports VNC connection from server or zone proxy |
NodeCapability::LocalVNC |
0x0100000000 |
Node supports VNC connection via local agent |
NodeCapability::RegisteredForBackup |
0x0200000000 |
Node is registered for device configuration backup |
NodeCapability::ServiceManager |
0x0400000000 |
Node has service manager accessible via NetXMS agent |
NodeCapability::SSHInteractiveChannel |
0x0800000000 |
Interactive (shell) SSH channel can be established |
NodeCapability::SSHCommandChannel |
0x1000000000 |
SSH command channel can be established |
NodeCapability::AgentLLDP |
0x2000000000 |
Agent exposes |
NodeCapability::NETCONF |
0x4000000000 |
Node supports NETCONF protocol |
(no named constant) |
0x8000000000 |
Agent supports inbound TLS tunnel connections |
| Value | Description |
|---|---|
0 |
Unknown |
1 |
Physical |
2 |
Virtual |
3 |
Controller |
4 |
Container |