I. Overview
Syslog-ng is installed on both servers, one server and one client;
Server: 192.168.209.19
Client: 192.168.209.18
Ii. Installation
Run the following command to install Yum:
Yum-y install syslog-ng
After completion, restart the syslog-ng service and the service syslog-ng restart reports the following error:
P
Introduction to syslog and syslog
Application of Syslog in Network Management
Syslog is an industrial standard protocol that can be used to record device logs. In UNIX systems, routers, switches, and other network devices, System logs record System events at any time. Administrators can view system records to keep abre
Today, Rangers bring you the software from the world's largest online software provider-Zhouhau software (ZOHO), the tool name is "free syslog forwarder Tool", the toll-free syslog forwarding tool.
There is a scenario where we have multiple log servers, or log analysis platforms, but many routers, switches, firewalls, and other devices only support the forwarding of sy
Logging//Defines the listener port source s_remote {TCP (IP (0.0.0.0) port (514)); UDP (IP (0.0.0.0) port (514));
}; Defines the format, location, and permissions that the client log saves on the server destination r_console {file ("/var/log/syslog-ng/$YEAR $month$day/$HOST/console" owner ("
Root ") Group (" Root ") perm (0640) dir_perm (0750) create_dirs (yes); Destination R_secure {file ("/var/log/
Rsyslog ProcessSyslog is a tool that records logging in the system and can support local or remote log writes.In the LinuxMint environment, the upstart-based daemon is placed in the/etc/init/directory, and the following command can be used to view the specific startup script:[Email protected]:/var/log$ less/etc/init/rsyslog.confTo see if the current RSYSLOGD has been started:[Email protected]:/var/log$ initctl List | grep rsyslogRsyslog start/running, Process 6344. Flexible use of
Http://areyouok.iteye.com/blog/287980
IntroductionDifferent Linux distributions use different syslog programs to record system logs.Debain 4.0/ubuntu8.04 (desktop version) uses sysklogd by default, and the configuration file is/etc/syslog. conf.By default, fedora9 uses rsyslogd. The configuration file is/etc/rsyslog. conf.Opensuse11 uses syslog-ng and the configu
Environment:Log Collection server: syslog-ng_v3.3.7Tomcat client: Syslog + TomcatInterference:1. Shut down the firewall and selinux for ease of debugging.#service iptables Stop//stop firewall #chkconfig iptables off//boot does not start #service iptables status//view firewall statusThe firewall has stopped running.650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M01/7F/27/wKioL1cVjtDhtxNSAAAU1tTy_lQ91
Tags: reference local type command ogg SWA Tor interface LinFirst, the configuration commands are logged to the syslog:Under/ETC/BASHRC of the client, add:Logger-p local3.info \ "' Who am I ' ======================================= is login \"Export prompt_command= ' {msg=$ (History 1 | {read x y; echo $y;}); Logger-p Local3.info \[$ (Who am I) \]\# \ "${msg}" \ "; }‘Logger command:For the Syslog Shell Interface command, there are some parameters that
) $InputFilePersistStateInterval 1# Active read, you can set up multiple sets of log reads, set this parameter at the end of each group. To take effect. $InputRunFileMonitor # When submitting logs to a different server, specify the server Ip:port here separately, #如都提交在同一服务器只需在rsyslog. conf specify one time to #local5.*@ @192.168.1.251:514##tomcat Localhost.log Path, modified according to the actual situation: $InputFileName /web/webfront/logs/localhost.log $InputFileTag catalina-log$inputfilefa
Syslog-ng is installed to manage server logs in a unified manner. The installation method is found online. Some problems need to be solved now;
1. The log server can synchronize the log files on a daily basis, but the log files you want cannot be synchronized to the server because you need to customize the log files. Now, I have posted the configuration documents and hope to learn from them.
Install syslog
configuration.Install
Installation is simple. To make it as easy as possible, I will install it from the standard repository. Open a terminal window and run the following command:
sudo apt install syslog-ng
You must run the above command on both the collector and the client machine. After the installation is complete, you will start to configure.Configure collectors
Now, we start to configure the log collector. Its configuration file is/etc/
client to perform one of the following three tasks:Save the log message to a local file;Routing messages to a remote syslog server via TCP/UDP;Send it to a standard output, such as a console.In Rsyslog, the configuration of the syslog is structured based on the following pattern.[Facility-level].[Severity-level] [Destination]Configuring Rsyslog in LinuxAfter we
perform one of the following three tasks:Save the log message to a local file;Routing messages to a remote syslog server via TCP/UDP;Send it to a standard output, such as a console.In Rsyslog, the configuration of the syslog is structured based on the following pattern.[Facility-level].[Severity-level] [Destination]Configuring Rsyslog in LinuxAfter we understand
client to perform one of the following three tasks:Save the log message to a local file;Routing messages to a remote syslog server via TCP/UDP;Send it to a standard output, such as a console.In Rsyslog, the configuration of the syslog is structured based on the following pattern.[Facility-level].[Severity-level] [Destination]Configuring Rsyslog in LinuxAfter we
);
Owner (root );
Group (root );
Perm (0640 );
Dir_perm (0750 );
};
Source src
{
# Message generated by Syslog-NG
# Internal ();
# Standard Linux log source (this is the default place for the syslog ()
# Function to send logs)
# Unix-stream ("/dev/log ");
# Messages from the kernel
# Pipe ("/proc/kmsg ");
# Remote port
TCP/IP (ip (0.0.0.0) port (514 ));
# Udp (
view the contents of these files, as you can quickly display their contents on the screen with the Zcat command. One disadvantage of the syslog server is that it does not filter out messages from bad sources. Therefore, when your server is in an insecure network, it is a wise move to use TCP wrappers software or firewalls to limit acceptable sources. This will help limit the effectiveness of the denial o
192.168.1.22 host2
......
M4 is responsible for interpreting ifdef, and its deeds will not be further investigated here (the brothers and sisters who want to take the test of SA can look at it and have questions). The above ifdef means: if the local machine is loghost, the information is sent to/var/log/authlog; otherwise, it is sent to the host after.
The following example shows how to use the syslog mechanism to record telnet logon.
Many netw
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.