Hardware and Software Inventory

During each configuration poll, the server reads the hardware components and the installed software packages of a node from its NetXMS agent. It stores both lists and generates events when they change between polls. This inventory is collected only from nodes with a native NetXMS agent. The Hardware Inventory view can also show components of SNMP devices, but changes are tracked only for the agent inventory described here.

Hardware Inventory

The hardware inventory has these component categories, read from the agent:

Category Agent source

Baseboard

Hardware.Baseboard.Manufacturer, Hardware.Baseboard.Product, Hardware.Baseboard.SerialNumber, Hardware.Baseboard.Type

Processor

Hardware.Processors table

Memory device

Hardware.MemoryDevices table

Storage device

Hardware.StorageDevices table

Battery

Hardware.Batteries table

Network adapter

Hardware.NetworkAdapters table

Which categories an agent reports depends on its platform; see Hardware Information Metrics. On Linux, baseboard, processor, memory, and battery information comes from the SMBIOS tables in /sys/firmware/dmi/tables/DMI, which only root can read. An agent that does not run as root does not report these components. Storage devices and network adapters are read with the lshw command, which must be installed on the node.

To see the components of a node, open its Hardware Inventory view.

Detecting Hardware Changes

The server compares the component list from each configuration poll with the stored list:

  • SYS_HARDWARE_COMPONENT_ADDED is generated for each component that is new.

  • SYS_HARDWARE_COMPONENT_REMOVED is generated for each component that is no longer reported.

A component is identified by its category, index, serial number, part number, model, location, and vendor. A component that changes any of these, for example a memory module replaced with a different one in the same slot, is reported as one removed and one added component. Storage devices and network adapters are also matched by their index, so a changed device order, for example after adding a disk, is reported as removed and added components.

The first list collected from a node is stored without generating events. The list is kept in the database, so a server restart does not reset it. If every hardware read from the agent fails, the stored list is kept and no events are generated. If only some reads succeed, or a source returns no components, the components that are missing are reported as removed. For example, when a Linux agent that ran as root is restarted as another user, its processors, memory devices, and batteries are reported as removed.

Changes are detected at configuration polls, which by default run every 3600 seconds (Objects.ConfigurationPollingInterval). To check a node immediately, run Poll  Configuration on it.

Software Inventory

The software inventory is read from the agent’s System.InstalledProducts table. To see the packages of a node, open its Software Inventory view.

A package is identified by its name and, for packages installed for a single user, the user name:

  • SYS_PACKAGE_INSTALLED is generated for a new package.

  • SYS_PACKAGE_UPDATED is generated when the version of a package changes.

  • SYS_PACKAGE_REMOVED is generated for a package that is no longer reported.

A package installed in several versions at the same time can be reported as installed and removed instead of updated. As with hardware, the first list is stored without generating events, and a failed read keeps the stored list.

Alarms on Inventory Changes

Inventory events have severity Normal.

For software changes, the default event processing policy has the rule Generate alarm on software package changes. It creates an alarm for each of the three package events, with the event’s severity and the alarm key SW_PKG_%i_%<name>.

Hardware events are only written to the event log; no rule in the default policy acts on them.

To get an alarm when hardware changes:

  1. Open Configuration  Event Processing Policy and add a rule.

  2. On the Events filter page, add SYS_HARDWARE_COMPONENT_ADDED and SYS_HARDWARE_COMPONENT_REMOVED.

  3. Restrict the source objects if only some nodes matter.

  4. On the Alarm page, select Create new alarm, set the severity (for example Major), and use a message such as Hardware change on %n: %m and an alarm key such as HW_CHANGE_%i.

  5. Save the event processing policy.

The events have these parameters, which can be used in messages and filtering scripts:

Event Parameters

SYS_HARDWARE_COMPONENT_ADDED, SYS_HARDWARE_COMPONENT_REMOVED

category, type, vendor, model, location, partNumber, serialNumber, capacity, description

SYS_PACKAGE_INSTALLED, SYS_PACKAGE_REMOVED

name, version, user (empty for packages installed for all users)

SYS_PACKAGE_UPDATED

name, version, previousVersion, user

Scripting

In NXSL, the hardwareComponents and softwarePackages attributes of the Node class return the stored lists as arrays of HardwareComponent and SoftwarePackage objects.