$file_name (" . __("File is too large than PHP memory allocated in the system.") . ")";
echo "
" . __("The preview file is imposible.") . "
";
}
else if ($file_size > 512000) {
$data = file_get_contents ($file_name, false, NULL, $file_size - 512000);
echo "$file_name (".__("File is too large (> 500KB)").")
";
echo "
";
}
else {
$data = file_get_contents ($file_name);
echo "$file_name (".format_numeric(filesize ($file_name)/1024)." KB)
";
echo "
";
}
}
}
function pandoralogs_extension_main () {
global $config;
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
db_pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;
}
ui_print_page_header (__("System logfile viewer"), "images/extensions.png", false, "", true, "" );
echo "" . __('This tool is used just to view your Pandora FMS system logfiles directly from console') . "
";
$logs_directory = (!empty($config["server_log_dir"])) ? io_safe_output($config["server_log_dir"]) : "/var/log/pandora";
view_logfile ($config["homedir"]."/pandora_console.log");
view_logfile ($logs_directory."/pandora_server.log");
view_logfile ($logs_directory."/pandora_server.error");
}
extensions_add_godmode_menu_option (__('System logfiles'), 'PM','glog', null, "v1r1");
extensions_add_godmode_function('pandoralogs_extension_main');
?>