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 |
|
Processor |
|
Memory device |
|
Storage device |
|
Battery |
|
Network adapter |
|
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_ADDEDis generated for each component that is new. -
SYS_HARDWARE_COMPONENT_REMOVEDis 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 that have a serial number are matched without their index, so a changed device order does not generate events.
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 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_INSTALLEDis generated for a new package. -
SYS_PACKAGE_UPDATEDis generated when the version of a package changes. -
SYS_PACKAGE_REMOVEDis 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:
-
Open and add a rule.
-
On the Events filter page, add
SYS_HARDWARE_COMPONENT_ADDEDandSYS_HARDWARE_COMPONENT_REMOVED. -
Restrict the source objects if only some nodes matter.
-
On the Alarm page, select Create new alarm, set the severity (for example Major), and use a message such as
Hardware change on %n: %mand an alarm key such asHW_CHANGE_%i. -
Save the event processing policy.
The events have these parameters, which can be used in messages and filtering scripts:
| Event | Parameters |
|---|---|
|
|
|
|
|
|
Scripting
In NXSL, the hardwareComponents and softwarePackages attributes of the Node class return the stored lists as arrays of HardwareComponent and SoftwarePackage objects.