Commit graph

16 commits

Author SHA1 Message Date
13b84b4da1
feat: Run formatters 2024-10-21 12:55:54 +02:00
sinavir
f512e7a0a9 fix: replace list.push by list.append 2024-03-27 18:49:05 +01:00
sinavir
116334be2f fix: make lshw props finding more resilient 2024-03-27 17:12:48 +01:00
Alexander Daichendt
08360bafbb fix: lshw crashes due to duplicate logical name 2023-04-08 11:17:23 +02:00
Christophe Simon
84a9aca141 Unnamed network interfaces.
Some interfaces do not have device (logical) name (eth0, for instance), such
as not connected network mezzanine cards in blade servers.

In such situations, the card will be named `unknown[0-9]`.
2022-03-07 17:18:35 +01:00
Christophe Simon
e789619b34 Added disks extended attributes
This patch brings some of the physical and virtual drive attributes as
`custom_fields` to the disks inventory.

The goal is to have this information present to ease disks maintenance
when a drive becomes unavailable and its attributes can't be read anymore
from the RAID controller.

It also helps to standardize the extended disk attributes across the
different manufacturers.

As the disk physical identifers were not available under the correct
format (hexadecimal format using the `xml` output as opposed as `X:Y:Z` format
using the default `list` format), the command line parser has been
refactored to read the `list` format, rather than `xml` one in the
`omreport` raid controller parser.

As the custom fields have to be created prior being able to register
the disks extended attributes, this feature is only activated using the
`--process-virtual-drives` command line parameter, or by setting
`process_virtual_drives` to `true` in the configuration file.

The custom fields to create as `DCIM > inventory item` `Text` are described
below.

    NAME            LABEL                      DESCRIPTION
    mount_point     Mount point                Device mount point(s)
    pd_identifier   Physical disk identifier   Physical disk identifier in the RAID controller
    vd_array        Virtual drive array        Virtual drive array the disk is member of
    vd_consistency  Virtual drive consistency  Virtual disk array consistency
    vd_device       Virtual drive device       Virtual drive system device
    vd_raid_type    Virtual drive RAID         Virtual drive array RAID type
    vd_size         Virtual drive size         Virtual drive array size

In the current implementation, the disks attributes ore not updated: if
a disk with the correct serial number is found, it's sufficient to
consider it as up to date.

To force the reprocessing of the disks extended attributes, the
`--force-disk-refresh` command line option can be used: it removes all
existing disks to before populating them with the correct parsing.
Unless this option is specified, the extended attributes won't be
modified unless a disk is replaced.

It is possible to dump the physical/virtual disks map on the filesystem under
the JSON notation to ease or automate disks management. The file path has to
be provided using the `--dump-disks-map` command line parameter.
2022-03-02 15:53:38 +01:00
Cyril Levis
794f9787f0 NVME inventory fix.
The inventory crash with default nvme-cli version 1.8.1 on Centos7.
2021-07-09 11:00:41 +02:00
Cyrinux
0f2cb531ae
Fix inventory crash on nvme binary too old or absent (#170)
* When nvme binary absent or too old and no json output, this crash the inventory, i prefer just pass nvme inventory and continue

* log if nvme-cli is not installed
2020-10-14 12:40:19 +02:00
Cyrinux
0fe17c9687
Add GPU inventory support (#164)
* Add GPU support

* Some update in the doc
2020-09-18 12:29:05 +02:00
Cyrinux
a896d118d7
* Loop on nvme disk (#138)
* Remove vendor and product (not present, make crash)
* Use firmware version for version
2020-06-23 21:01:32 +02:00
Cyrinux
41f0b04d00
Add missing N/A fallback on DIMM memory (#129) 2020-06-09 09:05:35 +02:00
Solvik Blum
29d2bff805 fix flake8 errors 2020-05-22 13:23:28 +02:00
ThomasADavis
dc4f90d490
handle sockets with no cpu installed. should fix #117 (#118) 2020-02-21 09:13:02 +01:00
ramnes
bab2d26ad0 Setup tests 2020-02-02 20:24:01 +01:00
Solvik
458d1f83c2
fix {'part_id': ['This field may not be null.']} error (#78) 2019-09-11 14:22:32 +02:00
ThomasADavis
b7b22ae316 use lshw for inventory (#58)
* Use lshw for inventory
* Add motherboard to inventory
* Handle non raid devices
* Handle nvme drives
2019-09-05 15:13:36 +02:00