#0 {main} thrown in /usr/local/bin/telegraf_pfifgw.php on line 13[17-Mar-2024 10:34:40 Europe/Berlin] PHP Fatal error: Uncaught Error: Call to undefined function get_interfaces_info() in /usr/local/bin/telegraf_pfifgw.php:13
#!/usr/local/bin/php-cgi -f<?phprequire_once("config.inc");require_once("interfaces.inc");require_once("plugins.inc.d/dpinger.inc");require_once("util.inc");# Added function get_interface_info. Function was removed from interface.in in OPNsense version 24.1function get_interfaces_info($include_unlinked = false){ global $config; $all_intf_details = legacy_interfaces_details(); $all_intf_stats = legacy_interface_stats(); $gateways = new \OPNsense\Routing\Gateways(); $ifup = legacy_interface_listget('up'); $result = []; $interfaces = legacy_config_get_interfaces(['virtual' => false]); $known_interfaces = []; foreach (array_keys($interfaces) as $ifdescr) { $interfaces[$ifdescr]['if'] = get_real_interface($ifdescr); if (!empty($interfaces[$ifdescr]['if'])) { $known_interfaces[] = $interfaces[$ifdescr]['if']; } $interfaces[$ifdescr]['ifv6'] = get_real_interface($ifdescr, 'inet6'); if (!empty($interfaces[$ifdescr]['ifv6'])) { $known_interfaces[] = $interfaces[$ifdescr]['ifv6'];
<?phprequire_once("config.inc");require_once("interfaces.inc");require_once("plugins.inc.d/dpinger.inc");require_once("util.inc");# Added function get_interface_info. Function was removed from interface.in in OPNsense version 24.1function get_interfaces_info($include_unlinked = false){ global $config; $all_intf_details = legacy_interfaces_details(); $all_intf_stats = legacy_interface_stats(); $gateways = new \OPNsense\Routing\Gateways(); $ifup = legacy_interface_listget('up'); $result = []; $interfaces = legacy_config_get_interfaces(['virtual' => false]); $known_interfaces = []; foreach (array_keys($interfaces) as $ifdescr) { $interfaces[$ifdescr]['if'] = get_real_interface($ifdescr); if (!empty($interfaces[$ifdescr]['if'])) { $known_interfaces[] = $interfaces[$ifdescr]['if']; } $interfaces[$ifdescr]['ifv6'] = get_real_interface($ifdescr, 'inet6'); if (!empty($interfaces[$ifdescr]['ifv6'])) { $known_interfaces[] = $interfaces[$ifdescr]['ifv6'];