DCI Templates

Data collection items (DCIs) defined on templates are the primary mechanism for standardized metric collection across your NetXMS infrastructure. When you add a DCI to a template, every node the template is applied to automatically receives a copy of that DCI.

Creating DCIs on Templates

  1. Open the template in the management client

  2. Navigate to Data Collection view

  3. Right-click and select New parameter…​ (or New table…​ for a table DCI)

  4. Configure the DCI parameters:

    • Display name: human-readable name (supports macros like %{node_name})

    • Origin: data source (Agent, SNMP, Internal, Push, Script, etc.)

    • Metric: metric name or OID

    • Polling interval: how often to collect

    • History retention period: how long to keep collected data (server default or custom)

The DCI is immediately deployed to all nodes the template is currently applied to.

DCI Origins

Templates support all DCI origin types:

Origin Description

Internal

Data generated inside NetXMS server process (server statistics, etc.)

NetXMS Agent

Collects metrics via the NetXMS agent

SNMP

Data collected via SNMP transport

Web Service

Data obtained from JSON, XML, or plain text retrieved via HTTP/HTTPS

Push

Values pushed by external system (using nxpush, nxapush tools or API), from NXSL script, or log file parser

Windows Performance Counters

Data collected via NetXMS agent running on Windows

SM-CLP

Data collected via Server Management Command Line Protocol

Script

Value generated by NXSL script stored in Script Library

SSH

Data obtained from output of SSH command

MQTT

Data obtained by subscribing to MQTT broker topics

Network Device Driver

Metrics provided by SNMP drivers (e.g. NET-SNMP, RITTAL)

Modbus

Data collected via Modbus-TCP industrial protocol

EtherNet/IP

Data collected via EtherNet/IP industrial protocol

NETCONF

Data collected via NETCONF protocol

Cloud Connector

Data collected from cloud provider APIs

OTLP

Data received via OpenTelemetry protocol

Traffic Observer

Data from network traffic observation

Thresholds

Thresholds define conditions that generate events when DCI values exceed defined limits. Thresholds are configured per-DCI and propagate along with the DCI to all nodes the template is applied to.

Threshold Configuration

Each threshold specifies:

  • Function: what is evaluated (last polled value, average value, mean deviation, diff with previous value, data collection error, sum of values, script, absolute deviation, anomaly)

  • Operation: comparison operation (<, <=, ==, >=, >, !=, like, not like, and case-insensitive variants)

  • Value: the limit to compare against

  • Activation event: event generated when the threshold is breached

  • Deactivation event: event generated when the value returns to normal

  • Samples: number of consecutive polls that must breach the threshold before activation (plus a separate Deactivation samples setting)

  • Repeat event: whether to re-generate the activation event while the threshold remains active (Use default settings, Never, or every N seconds)

Example: to alert when CPU usage exceeds 90% for three consecutive polls:

Function

Last polled value

Operation

>

Value

90

Samples

3

Activation Event

SYS_THRESHOLD_REACHED

Deactivation Event

SYS_THRESHOLD_REARMED

Multiple Thresholds

A single DCI can have multiple thresholds with different severity levels:

  • Warning threshold at 80%

  • Critical threshold at 95%

Thresholds are evaluated in list order, and processing stops at the first threshold that activates — order the most severe conditions first. To evaluate every threshold on each poll regardless of earlier activations, enable Process all thresholds on the DCI’s Thresholds page.

Instance Discovery

For DCIs that monitor multiple instances (disk volumes, network interfaces, database tablespaces), templates support automatic instance discovery.

Discovery Methods

Method Description

Agent List

Uses an agent list metric to enumerate instances

Agent Table

Uses an agent table metric

SNMP Walk - Values

Walks an OID tree, using retrieved values as instances

SNMP Walk - OIDs

Walks an OID tree, using OID suffixes as instances

Script

Runs an NXSL script that returns the instances

Windows Performance Counters

Enumerates Windows performance counter instances

Web Service

Enumerates instances from a web service response

Internal Table

Uses an internal server table

SM-CLP Targets

Enumerates targets via Server Management Command Line Protocol

SM-CLP Properties

Enumerates properties of an SM-CLP target

Push

Instances created from pushed values

OTLP

Instances created from data received via OpenTelemetry protocol

Configuring Instance Discovery

  1. Create a DCI on the template with the metric name containing {instance} placeholder

  2. Open the DCI properties and go to the Instance Discovery tab

  3. Select the discovery method

  4. Configure the discovery parameter (agent list name, SNMP OID, or NXSL script)

  5. Optionally set an instance filter (NXSL script that returns true for instances to monitor)

When the template is applied to a node, NetXMS discovers the available instances on that node and creates a separate DCI for each instance.

Instance Retention

When an instance disappears (e.g., a disk is removed), the corresponding DCI is disabled and a grace period starts; once the retention time expires, the DCI is deleted along with its collected data. The retention time is configured per DCI on the Instance Discovery page (Instance retention mode: server default or custom, in days). The server default is the DataCollection.InstanceRetentionTime configuration variable (7 days); a value of 0 deletes disappeared instances immediately.

Transformation Scripts

DCI values can be transformed before storage using NXSL scripts. This is configured on the Transformation tab of the DCI properties.

Common use cases:

  • Convert units (bytes to megabytes, Celsius to Fahrenheit)

  • Extract a value from a complex string

  • Compute a derived metric from multiple sources

  • Normalize vendor-specific values

Example transformation (convert bytes to megabytes):

return $1 / 1048576;

The variable $1 contains the collected value after delta calculation (for DCIs without delta calculation, this is the raw collected value). See NXSL Reference for scripting documentation.

DCI Status on Target Nodes

On each node the template is applied to, template DCIs show the originating template name in the Template column of the DCI list.

Template DCIs can technically be edited or deleted on the node — the client warns that the DCI came from a template — but any local change is overwritten (and deleted DCIs are recreated) on the next template update. Make changes on the template instead; the warning dialog’s Edit Source button jumps directly to the template’s copy of the DCI.

Bulk DCI Operations

Copy/Move

The Move or Copy submenu in the Data Collection view provides Copy to other object(s)…​ and Move to other object(s)…​; on nodes, it also contains Convert to template item…​, which moves a locally created DCI into a template. Each of these actions opens an object selection dialog. Duplicate, available as a top-level menu action, creates copies of the selected DCIs on the same object.

Bulk Update

The Bulk update…​ menu action changes common settings — polling mode and interval, retention mode and time, and unit name — on all selected DCIs at once.

Configuration Export/Import

Complete templates (with their DCIs, thresholds, and policies) can be exported and imported as part of server configuration export: Configuration > Export Configuration and Import Configuration.

Best Practices

  • Create granular templates focused on specific monitoring aspects (e.g., "Linux CPU", "Linux Disk", "PostgreSQL") rather than monolithic templates

  • Use instance discovery for variable-count resources instead of hardcoding instance names

  • Set appropriate polling intervals — not every metric needs 60-second polling

  • Configure retention times based on data granularity needs

  • Use transformation scripts sparingly — prefer collecting the metric in the right format when possible

  • Document template purpose in the template’s comments field