mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* It seems that after the PR #14087, the variable $agent_data is not accessible anymore in applications script. Just add the line `global $agent_data` at script start solve this issue. * It seems that after the PR #14087, the variable $agent_data is not accessible anymore in applications script. Just add `$agent_data` to the use in the applications polling script start solve this issue. Co-authored-by: Tony Murray <murraytony@gmail.com>
14 lines
465 B
PHP
14 lines
465 B
PHP
<?php
|
|
|
|
\DeviceCache::getPrimary()->applications->each(function ($app) use ($device, $agent_data) {
|
|
echo 'Application: ' . $app->app_type . ', app_id=' . $app->app_id;
|
|
|
|
$app_include = base_path('includes/polling/applications/' . \LibreNMS\Util\Clean::fileName($app->app_type) . '.inc.php');
|
|
if (is_file($app_include)) {
|
|
include $app_include;
|
|
} else {
|
|
echo 'ERROR: ' . $app_include . ' include file missing!';
|
|
}
|
|
echo "\n";
|
|
});
|