Difference between revisions of "Script Example: Enumerate All Custom Attributes for Node"

From NetXMS Wiki
Jump to navigation Jump to search
(Created page with "'''Requirements''' Enumerate all custom attributes on a node. '''Solution''' Note: this script requires NetXMS version 2.0.2 or higher. <syntaxhighlight lang="c"> attribu...")
 
m (Text replacement - "^" to "{{deprecated}}")
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{deprecated}}
{| style="border-spacing: 20px; border: 20px solid red;"
|
'''WARNING''': This page is no longer updated. Please visit '''[https://www.netxms.org/documentation/nxsl-latest/#_examples_2 NetXMS Script examples]''' for current version of the documentation.
|}
'''Requirements'''
'''Requirements'''



Latest revision as of 16:13, 13 September 2022

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

WARNING: This page is no longer updated. Please visit NetXMS Script examples for current version of the documentation.




Requirements

Enumerate all custom attributes on a node.


Solution

Note: this script requires NetXMS version 2.0.2 or higher.

attributes = $node->customAttributes;
foreach(a : attributes->keys)
{
        println a . "=" . attributes[a];
}