mirror of
https://github.com/unraid/webgui.git
synced 2026-01-21 09:00:19 -06:00
90 lines
3.5 KiB
Plaintext
90 lines
3.5 KiB
Plaintext
Menu="NetworkServices"
|
|
Title="Syslog Server"
|
|
Icon="icon-eula"
|
|
Tag="file-text-o"
|
|
---
|
|
<?PHP
|
|
/* Copyright 2005-2018, Lime Technology
|
|
* Copyright 2012-2018, Bergware International.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License version 2,
|
|
* as published by the Free Software Foundation.
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*/
|
|
?>
|
|
<?
|
|
$syslog = @(array)parse_ini_file('/boot/config/rsyslog.cfg');
|
|
?>
|
|
<style>
|
|
select.m130{margin-left:135px}
|
|
select.m30{margin-left:35px}
|
|
</style>
|
|
<script>
|
|
function localFolder(state) {
|
|
if (state) $('#local_folder').show(); else $('#local_folder').hide();
|
|
}
|
|
$(function(){
|
|
localFolder(document.syslog.local_server.value);
|
|
});
|
|
</script>
|
|
|
|
<form markdown="1" name="syslog" method="POST" action="/update.php" target="progressFrame">
|
|
<input type="hidden" name="#file" value="/boot/config/rsyslog.cfg">
|
|
<input type="hidden" name="#command" value="/webGui/scripts/rsyslog_config">
|
|
|
|
Local syslog server:
|
|
: <select name="local_server" class="narrow" size="1" onchange="localFolder(this.value)">
|
|
<?=mk_option($syslog['local_server'], "", "Disabled")?>
|
|
<?=mk_option($syslog['local_server'], "1", "Enabled")?>
|
|
</select>
|
|
<select name="server_protocol" class="narrow m130" size="1">
|
|
<?=mk_option($syslog['server_protocol'], "udp", "UDP")?>
|
|
<?=mk_option($syslog['server_protocol'], "tcp", "TCP")?>
|
|
<?=mk_option($syslog['server_protocol'], "both", "Both")?>
|
|
</select>
|
|
<input type="text" name="server_port" class="trim" value="<?=$syslog['server_port']?>" maxlength="4" placeholder="514">
|
|
|
|
> Let the server act as a central syslog server and collect syslog messages from other systems.
|
|
> The server can listen on UDP, TCP or both with a selectable port number.
|
|
>
|
|
> Syslog information is stored per IP address. That is every system gets its own syslog file.
|
|
|
|
<div markdown="1" id="local_folder" style="display:none">
|
|
Local syslog folder:
|
|
: <input type="text" name="server_folder" value="<?=$syslog['server_folder']?>" placeholder="/mnt/user/system">
|
|
|
|
> Enter the name of the local folder to store syslog information.
|
|
> By default this is set to /mnt/user/system
|
|
>
|
|
> *Important: make sure the folder EXIST when changing this field*
|
|
|
|
</div>
|
|
|
|
Remote syslog server:
|
|
: <input type="text" name="remote_server" class="narrow" value="<?=$syslog['remote_server']?>" maxlength="23" placeholder="name or ip address">
|
|
<select name="remote_protocol" class="narrow m30" size="1">
|
|
<?=mk_option($syslog['remote_protocol'], "udp", "UDP")?>
|
|
<?=mk_option($syslog['remote_protocol'], "tcp", "TCP")?>
|
|
</select>
|
|
<input type="text" name="remote_port" class="trim" value="<?=$syslog['remote_port']?>" maxlength="4" placeholder="514">
|
|
|
|
> Enter a name or IP address of a remote syslog server.
|
|
> This will send a copy of the syslog messages to the designated server.
|
|
|
|
Mirror syslog to flash:
|
|
: <select name="syslog_flash" class="narrow" size="1">
|
|
<?=mk_option($syslog['syslog_flash'], "", "No")?>
|
|
<?=mk_option($syslog['syslog_flash'], "1", "Yes")?>
|
|
</select>
|
|
|
|
> This setting is OFF by default and must be used with care to avoid unnecessary wear and tear of the USB device.
|
|
>
|
|
> Change this setting to YES when troubleshooting is required and it is not possible to get the regular diagnostics information.
|
|
> A mirror of the syslog file is stored in the **logs** folder of the flash device.
|
|
|
|
|
|
: <input type="submit" value="Apply" disabled><input type="button" value="Done" onclick="done()">
|
|
</form> |