Error polling unix-agent module

After upgrading to php8.1 I got the message “Error polling unix-agent module” for all devices.

I fixed it temporary with the following statement (*) on line 140 in unix-agent.inc.php

  •  if (!is_array($agent_data['app'])) {$agent_data['app']=array();};
      foreach (array_keys($agent_data['app']) as $key) {
          if (file_exists("includes/polling/applications/$key.inc.php")) {
1 Like

I also got the same error after upgrading to php 8.1 and applied the same fix (thanks). Appears to be a bug.

Opened unix-agent.inc.php TypeError after php8.1 Upgrade · Issue #14356 · librenms/librenms · GitHub