NXSL Reference
NXSL (NetXMS Scripting Language) is the embedded scripting language for the NetXMS network monitoring system. It is designed for automating monitoring tasks, transforming collected data, processing events, and extending NetXMS functionality through custom logic.
NXSL runs inside the NetXMS server in a sandboxed environment with controlled access to system objects. Scripts are compiled to bytecode and executed in the NXSL virtual machine.
Who This Documentation Is For
This reference is for NetXMS administrators and operators who write scripts to:
-
Transform and filter collected metric values
-
Automate event processing and alarm management
-
Create custom discovery and auto-bind rules
-
Build object tools and scheduled tasks
-
Extend NetXMS behavior through hook scripts
How This Documentation Is Organized
Language Guide
Learn the language and how to use it with NetXMS:
-
Getting Started — write and run your first script, understand script structure and return values
-
Language Syntax — complete reference for data types, operators, control flow, arrays, hash maps, and regular expressions
-
Working with NetXMS — interact with NetXMS objects, read DCI values, perform SNMP operations, and handle events
-
Script Contexts — predefined variables and return values for each script execution context
-
Script Security — understand trusted node validation and access control for scripts
-
Hook Scripts — customize server behavior at specific hook points (discovery, polling, login)
-
Best Practices — guidelines for performance, error handling, and maintainability
Function Reference
Complete reference of all built-in NXSL functions, organized by category: Objects, Data Collection, Events, Alarms, String Operations, Time and Date, Math, Cryptography, Base64, Network, File Operations, and more. Each function page documents parameters, return values, and usage examples.
Class Reference
Complete reference of all NXSL classes organized by domain: Base Classes, Network Objects, Data Collection, Events and Alarms, Infrastructure, Users and Security, Networking Utilities, Data Structures, Hardware and Software, Discovery and Diagnostics, OSPF and Routing, and LDAP Integration.
Appendices
-
Global Constants — predefined constant values (status codes, severity levels, data sources, node capabilities, and more)
-
Formal Grammar — EBNF grammar specification for the NXSL language
-
Cookbook — practical script recipes for common monitoring tasks
-
Alphabetical Index — all functions and classes in alphabetical order
-
Deprecated Functions — legacy functions with their modern replacements