, Fedora and Ubuntu,rhel default log systems are all rsyslog. Rsyslog is responsible for logging, logrotate for backing up and deleting old logs, and updating log files2. Advantages2.1, the unification of the log, centralized management2.2, real-time log transmission to a more secure remote server, the real record of user behavior, so that the log 2 changes in the probability of greatly reduced, so that the log can be true playback, easy to track the
To ensure the security of your RHEL7 system, you need to view the log files to monitor all activities in the system. In this way, you can detect any abnormal or potentially damaging activities and troubleshoot system faults or perform other appropriate operations. RHCE test-Part 5: Use Rsyslog and Logrotate to manage system logs in RHEL7. The rsyslogd daemon is responsible for system logs, which are run from/etc/rsyslog. conf (this file specifies all
purposesFacilitate centralized management of server logs
Ii. introduction of Rsyslog
1. Basic IntroductionRsyslog is a syslogd multi-threaded enhanced version, Fedora and Ubuntu,rhel default log systems are all rsyslog. Rsyslog is responsible for logging, logrotate for backing up and deleting old logs, and updating log files2. Advantages2.1, the unification of the log, centralized management2.2, real-time log transmission to a more secure remote se
MongoDB log switching (RotateLogFiles) Practice 1. In mongoshell, run the logRotate command: useadmindb. runCommand ({logRotate: 1}) and run it on mongos, mongod, and configserver. A) Run: mongolocalhostadmin-eval "dbo. runComma" in unixshell.
MongoDB Log Files (Rotate Log Files) Practice 1. In mongo shell, run the logRotate command: useadmindb. runCommand ({
that needs to be modified immediately emerg, panic # serious information such as kernel crash ### from top to bottom, the level is low to high, and fewer information is recorded. If the set log Content is err, the log will not record logs lower than the err level, but will only record more advanced than the err level Other logs include err logs. ========================================================== ====================================== Target: # file, such as/var/log/messages # user, root
First, using logrotate cuttingYum installed Nginx will automatically use logrotate this log management software for cutting, so this section we mainly introduce about logrotate related knowledge points.[email protected] bin]# Yum install-y nginx1.1 Logrotate IntroductionWhat is Lo
, monthly dump, weekly dump, or a certain size dump.
In Linux"Logrotate"Tool for log dumping, combinedCronSchedule Tasks with ease
Dump log files. The dump mode is set"/Etc/logrotate. conf"Configuration File control:
[Root @ xhot ~] # Cat/etc/logrotate. conf
# See "Man logrotate" For details // you can view the
.
All LOG information of IPtables can be recorded through the kernel function.
First, add the following content to the file syslog. conf:
# Iptables logging
Kern. debug/var/log/iptables
Then specify the level of debug for the iptables LOG rules (for example, iptables-I INPUT 1-j LOG -- log-prefix '[IPTABLES DROP LOGS]:' -- log-level debug ), you can store all the information in the file/var/log/iptables.
Restart the syslog service or restart the computer.
I use FC6 and use the service sys
following content to the file syslog. conf:
# Iptables logging
Kern. debug/var/log/iptables
Then specify the level of debug for The iptables LOG rules (for example, iptables-I INPUT 1-j LOG -- log-prefix '[IPTABLES DROP LOGS]:' -- log-leveldebug ), you can store all the information in the file/var/log/iptables.
Restart the syslog service or restart the computer.
I use FC6 and use the service syslog restart command to conveniently start the syslog service.
II. use IPtables to scroll logs
All lo
Nginx splits and polls log files by dayLogrotateLogrotate Introduction-------------------------------------The logrotate program is a log file management tool. It is used to delete the old log file and create a new log file. We call it a "dump ". We can dump the logs based on the log file size or the number of days. This process is generally executed by the cron program.The logrotate program can also be use
Tutorial purpose:Use the built-in Linux command logrotate to cut Nginx logs.Nginx installation directory:/usr/local/nginx/Nginx log Directory:/usr/local/nginx/logs/,/usr/local/nginx/logs/nginx_logs/1. Add an nginx log cutting scriptCd/etc/logrotate. d # enter the DirectoryVi/etc/logrotate. d/nginx # edit the script/Usr/local/nginx/logs/*. log/usr/local/nginx/logs
Iptables log Maintenance 1. Configure the syslogd configuration file/etc/syslog. conf in the file syslog. add the following content in conf # Iptables loggingkern. debug/var/log/iptables 2. Use the IPtables rolling log to view and determine the logrotate configuration file/etc/logrotate. conf content is as follows: # see "man logrotate" for details # rotate log f
statistical analysis in the day, spanning a long time log will make the statistical analysis program run particularly slow. Therefore, the Web server log files need to be round-robin every day.Web server log round robinThere are three ways to round the Web server log: The first is to take advantage of the Linux system's own log file round robin mechanism logrotate; The second method is to use Apache's own log rotation program Rotatelogs The third is
information in the/etc/syslog.conf. A detailed description of the Syslog protocol is in RFC3164.The Logrotate tool is used to periodically rename, compress, and post system log files, which ensures that log files do not take up too much disk space.1, configuration file/etc/syslog.conf: Syslog.conf is a syslogd process configuration file that will be read when the program starts, and the default location is/etc/syslog.conf. The blank lines in this con
mechanism: logrotate; the second approach is to use Apache's own log-round-robin program Rotatelogs The third is to use the Apache FAQ to recommend the development of a more mature log wheel tool cronolog.
For large Web services, the use of practical load balancing technology is often used to improve web site service capabilities, so that the background of a number of servers to provide Web services, which greatly facilitate the distribution plannin
Tags: logrotate rotate log files mongodb logs switchMongoDB Log switch (Rotate log Files) combat1. Under MONGO Shell, execute the logrotate command:Use admin db.runcommand ({logrotate:1})Need to run on Mongos,mongod,config server.Variants of the method:A) run under the Unix shell:MONGO Localhost/admin–eval "Dbo.runcommand ({l
Linux saves detailed records of events that occur in the system, which are called log files or message files. You can refer to the log file to determine the current state of the system, observe the intruder trail, and look for data related to a particular program (or event). SYSLOGD and KLOGD (monitor the Linux kernel-submitted messages) daemon is responsible for recording, sending the information generated by the system or tool, both of which are/etc/syslog.conf. When the system kernel or tool
can see that the client definition is passed to the 35 server, and the 35 server's/etc/syslog. there is also authpriv in Conf. */var/log/secure indicates the authpriv of the client. * The information is transmitted to the/var/log/secure file of the Administrator.Example 2:Or client ConfigurationVim/etc/syslog. confAuthpriv. * @ li.cluster.com -- use the domain name to define who to passThen the client needs to make a correspondence between the IP address and the host name.Vim/etc/hosts -- add10
continue writing, you just to restart the syslog (/etc/init.d/syslog restart)
Settings for the login server
Server-side configuration
Vim/etc/sysconfig/rsyslog------------CentOS 6.5 do not need to make changes in this configuration file,
Syslogd_options= "-M 0-r" only open port monitoring in/etc/rsyslod.conf
Configuration of the Client
Vim/etc/rsyslog.conf
*. * @192.168.1.100 TCP is @@
Rotation of the
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.