First, the installation of the service side
Yum source New, if any, you can omit
# cat >>/etc/yum.repos.d/sohu.repo
Install lamp environment and rsyslog, if have lamp, only need to install Rsyslog Rsyslog-mysql can
Yum install rsyslog rsyslog-mysql mysql mysql-devel my
Max_log_file, it will shift _logs (This is for keep_logs this mode), the new to reach the cut score of the log named Audit.log.1, the previous log audit.log. (num+1).Check the log, several times will also go to check the disk space is sufficient, the function used is fstatfs, to get the Audit.log file is located in the Mount partition of the space information, when the Space_left value or Admin_space_left, Or if the disk is low, the corresponding action is executed.So since AUDITD itself has th
A syslog server represents a central log monitoring point in a network, to which all kinds of devices including Linux or W indows servers, routers, switches or any other hosts can send their logs over network. By setting-a syslog server, you can filter and consolidate logs from different hosts and devices to a single location , so the can view and archive important log messages more easily. In this tutorial, we cover how to configure a centralized the syslog server using
Today, when configuring Rsyslog, it was suddenly discovered that messages secure Tallylog spooler These log files were all 0 and did nothing to generate logs.650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7F/6F/wKioL1ce5-jRUXVfAAANiEL7m4k413.jpg "title=" Spooler is empty 0byte.jpg "alt=" Wkiol1ce5-jruxvfaaaniel7m4k413.jpg "/>By comparing the snapshot files, it was found that the $actionfiledefaulttemplate module was used in the
Label:installation program and component system for centos6.6# yum install httpd php php-mysql php-gd mysql mysql-server rsyslog-mysql
Second, prepare the relevant configuration and test the environment1. Start Http,mysql service# service Mysqld Start# Chkconfig Mysqld on# service httpd Start# Chkconfig httpd on# vim/var/www/html/index.php2. Create a database, new user and authorize# RPM-QLRsyslog-mysql= = View the file acquisition generated by the i
Label:Here's the idea: Use the Linux Rsyslog service to do the underlying, then use the MySQL and Rsyslog templates to store the files and display them on the web. The storage of [[Email protected] ~]#grep-v ' ^# '/etc/rsyslog.conf|grep-v ' ^$ '
$ModLoad Ommysql*. *: ommysql:localhost,syslog,rsyslog,123456$ModLoad Imuxsock#provides support for local system loggi
Tags: rsyslog mysql loganalyzerRsyslog+mysql+loganalyzerOn the Linux system, the system can record from boot to the current system when what happened, and classify it, classified into a specific log file, such as the system itself generated problems, user login information, network data information and so on.On CentOS There is a rsyslog dedicated to record information on the system log, although
Rsyslog is divided into server and client
Client rsyslog configuration file configuration
Several items are useful.
$ Actionqueuetype queue list # use Asynchronous processing to enable cache queue
$ Actionqueuefilename backup_local # Set file name, also enables disk mode if the client is down, the cache queue is written to the local backup_local variable and the location has been defined.
$ Actionresumere
1. Server Installation
YUM source is created. If yes, it can be omitted.
#cat>>/etc/yum.repos.d/sohu.repo
[sohu]
name=sohu'smirrors
baseurl=http://mirrors.sohu.com/centos/5/os/x86_64/
enabled=1
gpgcheck=0
EOF
Install the LAMP environment and rsyslog. If LAMP is available, you only need to install rsyslog-mysql.
yuminstallrsyslogrsyslog-mysqlmysqlmysql-develmysql-serverphpphp-mysqlphp
Rsyslog By default can only transfer the system log, such as Dhcp,cron, now to send a service log to the remote Rsyslog server, how to do it?Workaround: To use the Rsyslog imfile module.Reference official url:http://www.rsyslog.com/doc/v8-stable/configuration/modules/imfile.htmlReference online URL:HTTP://WWW.TUICOOL.COM/ARTICLES/JV2EUVNRsyslog configuration file
ObjectiveAs an operations engineer, viewing the analysis system log is a daily homework, but every time you look at the log is a server one server to see, several servers can also deal with this, but if you manage hundreds of thousands of online servers, this method is stretched. So we need to use the log server, but how can it be more intuitive to display it? Loganalyzer is a good choice, this article will explain how to use rsyslog+loganalyze to ach
Linux can usually be rsyslog to achieve centralized management of the system log, in which case there will usually be a log server, and then each machine configures its own log through the Rsyslog to write to the remote log server.This assumes that there are two servers, one for the system log server (such as machine name Logmaster), and the other as a log client (such as machine name Logclient)Log server C
I. Introduction of LoganalyzerThe Loganalyzer tool provides an easy-to-use, powerful front-end for searching, viewing and analyzing network activity data, including system logs, event logs, and many other log sources. Since it only presents the data to our users, the data itself needs to be collected by another program, such as Syslogd,rsyslog (which is now the default syslogd for the distribution), Winsyslog or Monitorware proxy. Loganalyzer is also
Many software comes with cutting logs, such as Tomcat, which can be named by time. Rsyslog can generate files by date, but does not support "% $year%-% $month%-% $day%" These variables to read the file (current version number: rsyslog-8.17.0-1.el6.x86_64).Then, you need to use the log polling logrotate.
overview, configuration.Global configuration:/etc/logrotate.confLocal configuration:/etc/logrota
There is a new requirement: PostgreSQL logs in the rsyslog server should be separated, according to priority, that is:
Logs of error and warn must be archived in one file;
Info and other levels of logs are archived in one file, and logs are automatically cut every hour;
Solution:
1. Create the configuration file PostgreSQL. conf in the/etc/rsyslog. d directory.
vi/etc/rsyslog.d/postgresql.conf
# Define
Environment: Both the client and the server need to install the Rsyslog serviceRsyslog Server SideCd/etc/rsyslog.d/cat server.conf$modload Imtcp$inputtcpserverrun 514 vim/etc/rsyslog.conflocal4.* /var/log/history.logRsyslog Client Sidecat/etc/rsyslog.d/client.conflocal4.* @ @server End ip:514Cat/etc/profile.d/client.shexport prompt_command= ' {msg=$ (History 1 | {read x y; echo $y;}); Logger-p local4.info ["local| ' grep ipaddr/etc/sysconfig/network-s
Tags: mysql nginx loganalyzer rsyslog logWith the increase of the server, feel the time to look at the log has been more and more, but also a variety of inconvenient, so want to focus on a server to deal with. I forgot it after I was afraid to use it, so I'll make a note.Because my LNMP environment has been set up very early. So it was used directly.I also refer to this article to build.Http://www.cnblogs.com/mchina/p/linux-centos-
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.