Added disks extended attributes #202
No reviewers
Labels
No labels
help wanted
need testing
status: accepted
status: discussing
type: bug
type: documentation
type: duplicate
type: enhancement
type:hardware
type: invalid
type: major feature
type: minor feature
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: DGNum/netbox-agent#202
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/chriss/disk_extended_information"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 asX:Y:Z
format using the defaultlist
format), the command line parser has been refactored to read thelist
format, rather thanxml
one in theomreport
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 settingprocess_virtual_drives
totrue
in the configuration file.The custom fields to create as
DCIM > inventory item
Text
are described below.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.