Improve Inventory: Search by device hostname

Hi

Currently in the Inventory page, I am able to search using description or serial, but not hostname. Would it be possible to implement that search field?
Also, the Device drop-down is not sorted by the device name (maybe by ID?) so it is very hard using that efficiently.

Regards,
Marcelo

2 Likes

could you specify what you mean with “Inventory”?

Sure, I mean /inventory

Devices are sorted alphabetic on my instance, also query says it will be sorted by hostname.
Is your LibreNMS instance on newest version?

Yes, it is on the latest version:
Version 1.61-24-gcc53801 - Tue Mar 10 2020 23:14:43 GMT+0100
Could it be because I am using the $config['force_ip_to_sysname'] = true; option? So it is sorting using the IP, not the sysname?

never used this option. What happens if you set it to false?

bingo, if I remove the option it will properly sort by IP, then by hostname, as expected. So it is sorting by hostname, and if hostname is not resolved and the force_ip_to_sysname option is set, it still uses the IP for sorting.

sounds like your Problem is solved?

No, I use that option because having the IPs as hostnames is impractical for identifying the devices, but the sorting in the inventory page is not taking that into account.

mmh
Problem is, i cannot reproduce it :confused:

Do you know if it is possible somehow to make Libre ‘rediscover’ the devices hostnames?

in editing a Device “Rediscover Device”
for complete Device Groups in Devices-> Manage Groups the yellow Buttons (Rediscover a Device Group)

this starts a new Discovery, not sure if Hostname is included, espescially it was overwritten manually

Thanks, I will try that.
I will consider that once that is fixed, the search should work, and close the request.

Rediscovering the devices does not actually fix the name resolution problem. Device name is still shown as IP after discovery.

1 Like