Device Type not setting

Device type is not setting normally, I can set it manually, and if I run Discovery from Capture Debug Information it will set, but normally discovery, or from cli do not seem to set device type

===========================================

Component Version
LibreNMS 25.12.0 (2025-12-15T08:05:13-06:00)
DB Schema 2025_12_05_205509_devices_add_mtu_status (362)
PHP 8.3.6
Python 3.12.3
Database MariaDB 10.11.13-MariaDB-0ubuntu0.24.04.1
RRDTool 1.7.2
SNMP 5.9.4.pre2
===========================================

[OK] Composer Version: 2.9.2
[OK] Dependencies up-to-date.
[OK] Database Connected
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQL and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service is enabled
[OK] Locks are functional
[OK] Python wrapper cron entry is not present
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok

<!--
READ THIS FIRST:
Questions about *plugins* such as *Weathermap* should be posted in the Plugins category!!
https://community.librenms.org/c/plugins/15
-->

When asking for help and support, please provide as much information as possible. This should include:

  • Steps to reproduce an issue.
  • The output of ./validate.php

If it’s an issue with the WebUI then please consider including a screenshot and the browser version you are using.

If you are having troubles with discovery/polling include the pastebin output of:

./discovery.php -h HOSTNAME -d | curl --data-binary @- https://paste.rs/
./poller.php -h HOSTNAME -r -f -d | curl --data-binary @- https://paste.rs/

If you need to post any text longer than a few lines, please use a “pastebin” service, we recommend using https://paste.rs/ or https://paste.sh/

Discovery

Poller

./poller.php -h HOSTNAME -r -f -d

Gives deprecated error, instead I ran

lnms device:poll -vvv HOSTNAME

This problem is present at least from 22th November. This is the time I saw it for the first time.

It doesn’t matter if I try to add device from web gui or from cli. Result is the same - device is added but no type is set. Tested on Mikrotik RouterOS devices.

Interesting is when I run

lnms device:discover

It does set the device type

I’m seeing exactly the same thing - when running ./discovery.php or the cron discovery it does not populate the device type but running lnms device:discover does work

@murrant device type setting looks to have been removed from discovery.php with this: Modern discovery by murrant · Pull Request #17813 · librenms/librenms · GitHub

Any reason or can we restore it?

I don’t think I removed it, probably only moved it.

Yes, it was moved outside the os module because it had to.
We have two options:

  1. restore the check into discovery.php somehow (it can’t be in the core module)
  2. stop using discovery.php and use lnms device:discover

Sorry I didn’t mean it was moved when it wasn’t supposed to, more that it was no longer where it used to be hence type no longer gets discovered.

Ideally we’d do #2 if it can be done quickly and safely.