librenms / docker

LibreNMS Docker image
MIT License
691 stars 278 forks source link

Error Discover Processor with value-type integer #341

Closed tweak19 closed 1 year ago

tweak19 commented 1 year ago

Behaviour

Steps to reproduce this issue

  1. Discover Processor Informations with value Integer
  2. Docker Container latest (23.2.0)

Expected behaviour

Discover an Create the RDD-Graph with an Integer as in Versions before especually with PHP7

Actual behaviour

Error in Device Discovery

Logs

TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in /opt/librenms/LibreNMS/Device/Processor.php:238
Stack trace:
#0 /opt/librenms/LibreNMS/Device/Processor.php(238): preg_match()
#1 /opt/librenms/LibreNMS/Device/Processor.php(131): LibreNMS\Device\Processor::processData()
#2 /opt/librenms/LibreNMS/Device/YamlDiscovery.php(115): LibreNMS\Device\Processor::fromYaml()
#3 /opt/librenms/LibreNMS/Device/Processor.php(261): LibreNMS\Device\YamlDiscovery::discover()
#4 /opt/librenms/LibreNMS/Device/Processor.php(141): LibreNMS\Device\Processor::processYaml()
#5 /opt/librenms/includes/discovery/processors.inc.php(5): LibreNMS\Device\Processor::runDiscovery()
#6 /opt/librenms/includes/discovery/functions.inc.php(153): include('...')
#7 /opt/librenms/discovery.php(106): discover_device()
#8 {main}
preg_match(): Argument #2 ($subject) must be of type string, array given {"exception":"[object] (TypeError(code: 0): preg_match(): Argument #2 ($subject) must be of type string, array given at /opt/librenms/LibreNMS/Device/Processor.php:238)"}

Thanks for your Help

murrant commented 1 year ago

This is not possible with an unmodified install.