Cannot access "Manage Groups" section

After adding a new device group from the “Manage Groups” page I can no longer access the Manage Groups page. I receive the ever-helpful " Whoops, looks like something went wrong. Check your librenms.log"

Looking at the logs i see this: [2020-02-27 08:26:25] production.ERROR: Undefined index: not_in (View: /opt/librenms/resources/views/device-group/index.blade.php) {“userId”:1,“exception”:"[object] (ErrorException(code: 0): Undefined index: not_in (View: /opt/librenms/resources/views/device-group/index.blade.php) at /opt/librenms/LibreNMS/Alerting/QueryBuilderParser.php:293, ErrorException(code: 0): Undefined index: not_in at /opt/librenms/LibreNMS/Alerting/QueryBuilderParser.php:293)
#0 /opt/librenms/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(45): Illuminate\View\Engines\CompilerEngine->handleViewException(Object(ErrorException), 1)
#26 /opt/librenms/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#27 /opt/librenms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(163): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))

Not sure what to do with this information.

please run ./validate.php and post it here.

No issues. Same results for running validation via the UI.

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

Component Version
LibreNMS 1.60-81-gcf023b936
DB Schema 2020_02_10_223323_create_alert_location_map_table (159)
PHP 7.2.24-0ubuntu0.18.04.3
MySQL 10.1.44-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

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

[OK] Composer Version: 1.9.3
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

As I mentioned, this occurred after creating a new device group…is there a file that can be modified to remove the suspected problematic group?

Does anyone have any ideas on this?

Hi @Ziranthium
You probably need to search and delete the culprit via SQL DB for the time beeing.

Hi @Ziranthium
before you delete the Device Group directy in Database, could you please give use here a Screenshot or the output of the complete line, so we could take a look over it if we can reproduce it?

Not sure what you mean by “the complete line”. This is the entirety of the validate.php output:

$ ./validate.php

Component Version
LibreNMS 1.61-2-g83b1374ce
DB Schema 2020_02_10_223323_create_alert_location_map_table (159)
PHP 7.2.24-0ubuntu0.18.04.3
MySQL 10.1.44-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

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

[OK] Composer Version: 1.9.3
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
$

in librenms Database
do a

select * from device_groups;

and give us the output, so we can the Device Groups and pattern you used. So we can do tests with it for seeing if there exists a bug.

It looks like I had entered some bad logic rules for the new dynamic group that i had created. Once i poked around the MySQL database I found the issue and cleared it up. I appreciate you pointing me in the right direction.

could you print it here?
maybe someone find a way to write something to prevent such errors in future

this would be nice

Of course. Here is the bogus entry:

| 6 | Servers (Physical) | NULL | dynamic | {“condition”:“AND”,“rules”:[{“id”:“device_groups.name”,“field”:“device_groups.name”,“type”:“string”,“input”:“text”,“operator”:“not_in”,“value”:“Servers”}],“valid”:true,“joins”:[[“device_group_device”,“devices.device_id”,“device_group_device.device_id”],[“device_groups”,“device_group_device.device_group_id”,“device_groups.id”]]} | NULL |

@Ziranthium
you found a Bug
Fix is written https://github.com/librenms/librenms/pull/11250

thanks