Search in Health

librenms@librenms:~$ ./validate.php 
===========================================
Component | Version
--------- | -------
LibreNMS  | 25.3.0-87-g044adb6c9 (2025-04-03T01:49:31-04:00)
DB Schema | 2025_03_19_205700_fix_ospfv3_ports_table (331)
PHP       | 8.2.26
Python    | 3.11.2
Database  | MariaDB 10.11.6-MariaDB-0+deb12u1
RRDTool   | 1.7.2
SNMP      | 5.9.3
===========================================

[OK]    Composer Version: 2.8.6
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database connection successful
[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]    Distributed Polling setting is enabled globally
[OK]    Connected to rrdcached
[OK]    Active pollers found
[OK]    Dispatcher Service is enabled
[OK]    Locks are functional
[OK]    Python wrapper cron entry is not present
[OK]    Redis is functional
[OK]    rrdtool version ok

When using Health I can select any of the health statuses and try to search and it comes up blank
I worked yesterday and this morning it was no longer working.
I ran ./daily again and looks like another update came though
but I am still unable to search. Any guidance would be much appreciated.

librenms@librenms:~$ ./daily.sh 
Updating to latest codebase                        OK
Updating Composer packages                         OK
Updated from 0f830d5b3 to 044adb6c9                OK
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK


screen shots of what I am seeing

I tried this myself out of curiosity and can confirm the same thing happens for me.

librenms.log prints the following error when trying to search/filter, in this case dBm:

[2025-04-03T15:26:16][ERROR] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'device_hostname' in 'WHERE' (Connection: mysql, SQL: select count(*) as aggregate from `sensors` where `sensor_class` = dbm and (`device_hostname` like %nx-% or `sensor_descr` like %nx-% or `sensor_current` like %nx-% or `sensor_group` like %nx-%)) {"userId":4,"exception":"[object] (Illuminate\\Database\\QueryException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'device_hostname' in 'WHERE' (Connection: mysql, SQL: select count(*) as aggregate from `sensors` where `sensor_class` = dbm and (`device_hostname` like %nx-% or `sensor_descr` like %nx-% or `sensor_current` like %nx-% or `sensor_group` like %nx-%)) at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829)
[previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'device_hostname' in 'WHERE' at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:423)"}

The problem exists for every (I would think since it seems related to “device_hostname” being unknown, haven’t tested all of them but like 5-6 and they all fail in the same way) category under “Health” just different sensors of course.

===========================================
Component | Version
--------- | -------
LibreNMS  | 25.3.0-85-g4fd92b21d (2025-04-02T20:30:21+02:00)
DB Schema | 2025_03_19_205700_fix_ospfv3_ports_table (331)
PHP       | 8.3.11
Python    | 3.12.3
Database  | MariaDB 10.11.11-MariaDB-0ubuntu0.24.04.2
RRDTool   | 1.7.2
SNMP      | 5.9.4.pre2
===========================================

odd this is that this worked a few days ago, must be with the new update.

Just jumping in here because I noticed the same thing when trying to search the health screen for bad UPS batteries.

===========================================
Component | Version
--------- | -------
LibreNMS  | 25.3.0-96-ge18c5cbf7 (2025-04-05T18:34:01-04:00)
DB Schema | 2025_03_19_205700_fix_ospfv3_ports_table (331)
PHP       | 8.3.6
Python    | 3.12.3
Database  | MariaDB 10.11.11-MariaDB-0ubuntu0.24.04.2
RRDTool   | 1.7.2
SNMP      | 5.9.4.pre2
===========================================

This should fix the issues: Fixed backend table searches by laf · Pull Request #17412 · librenms/librenms · GitHub

1 Like

Just updated our install and it looks like health search is working again. :slight_smile:

===========================================
Component | Version
--------- | -------
LibreNMS  | 25.3.0-101-g3f8db4fcf (2025-04-07T14:55:42-04:00)
DB Schema | 2025_03_19_205700_fix_ospfv3_ports_table (331)
PHP       | 8.3.6
Python    | 3.12.3
Database  | MariaDB 10.11.11-MariaDB-0ubuntu0.24.04.2
RRDTool   | 1.7.2
SNMP      | 5.9.4.pre2
===========================================
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.