Package Management

Introduction

The package management functionality can upload and execute installers via the NetXMS agent. This allows you to perform centralized upgrade of the NetXMS agent, install other software, or upload and extract archive files onto target systems.

It is not recommended to use this package management feature to upgrade a NetXMS agent installed via a system package manager (e.g., apt, dnf, yum). The server does not prevent such deployment, but upgrading an agent managed by the distribution package manager may conflict with the system packaging tools, overwrite files tracked by the package system, or leave packages in an inconsistent state. Use your distribution’s package manager to update the NetXMS agent on such systems.

Uploading Packages

To access package management, open the Configuration perspective and select Packages. Software packages are first uploaded to the NetXMS server. To do this, select Upload to server and select a file.

For some types of packages, the additional Edit Package Metadata dialog is displayed. This allows you to specify additional metadata for a package. Whenever possible, metadata information is filled in automatically based on information contained in the file name.

You can open the metadata editor by double-clicking on a package in the list. In the metadata editor, Name, Version, and Description are informative fields — they are not used in package processing.

A NetXMS package information file (.npi) can also be selected for upload. This is a deprecated metadata file format describing a NetXMS agent package: the management client reads package metadata from it and uploads the package file it references.

Platform Field

Platform denotes for which platforms a package is applicable. The actual platform of a node is compared to this field as a string value using wildcard characters. Two wildcard characters are supported:

  • * — represents zero, one, or multiple characters

  • ? — represents any single character

Setting Platform to means any platform. Linux means both 32 and 64 bit Linux systems.

Package Types

Type defines the package type, which determines how the agent should process the package when installing it. The meaning of the Command field depends on the package type (see table below). Putting @ at the beginning of Command enables macro expansion (the @ character is stripped from the command).

Package Type Extension Description

NetXMS Agent Package (agent-installer)

.apkg

Command is not used by this package type.

Debian Binary Package (deb)

.deb

Command contains additional parameters passed to /usr/bin/dpkg

Executable (executable)

.exe

Command is optional. If specified, it sets the actual command executed by the agent. ${file} macro will be replaced by the actual file name.

Windows Installer Package (msi)

.msi

Command contains additional parameters passed to Windows installer API

Windows Installer Patch (msp)

.msp

Command contains additional parameters passed to Windows installer API

Windows Update Package (msu)

.msu

Command contains additional parameters passed to wusa.exe

RPM Package (rpm)

.rpm

Command contains additional parameters passed to /usr/bin/rpm

Compressed TAR Archive (tgz)

.tgz, .tar.gz

Command is optional. If specified, it defines the path the archive should be extracted to.

ZIP Archive (zip)

.zip

Command is optional. If specified, it defines the path the archive should be extracted to.

Some package types can only be processed on certain platforms: msi, msp, and msu packages are supported only on Windows; deb, rpm, and tgz packages only on non-Windows systems; executable and zip packages are supported on all platforms.

Deploying Packages

To deploy a package, select one or several nodes from Infrastructure Services or Entire Network. You can also select containers or subnets. Right-click on the selected items and select Deploy package…​. Select the package and click OK.

During the package deployment process, the server will request the platform name from the agent and check if it matches Platform from the package metadata. For agent installer packages, the value of the System.PlatformName metric is used; for all other package types, System.OSPlatformName is used (falling back to System.PlatformName for older agents that do not provide it). Agent installer packages with Platform set to src are deployed only if the agent reports source package support via the Agent.SourcePackageSupport metric.

Deployment of agent installer packages to the node representing the local NetXMS server (the management node) is refused by the server.

Package deployment can also be scheduled using the Agent.DeployPackage scheduled task type (see Scheduling).

Monitoring Deployment

Deployment progress is tracked in the Package deployment jobs view in the Configuration perspective. Each deployment job is shown with the following columns: ID, Node, User, Status, Error message, Creation time, Execution time, Completion time, Package ID, Package type, Package name, Platform, Version, File, and Description. A job that has not completed yet can be aborted with the Cancel action.

If a target node is unreachable, deployment is retried automatically; the number of attempts is limited by the PackageDeployment.MaxRetryCount server configuration variable.

Server Configuration Variables

The following server configuration variables control package deployment:

Variable Default Description

PackageDeployment.JobHistorySize

1000

Maximum number of completed deployment jobs kept for display in the Package deployment jobs view

PackageDeployment.JobRetentionTime

7

Retention time (in days) for completed deployment jobs

PackageDeployment.LogRetentionTime

90

Retention time (in days) for package deployment log records

PackageDeployment.MaxRetryCount

16

Maximum number of automatic deployment retries for offline nodes

PackageDeployment.MaxThreads

25

Maximum number of threads used for parallel package deployment