With the increase of server and network equipment in the room, log management and query become a headache for system administrators.The common problems that system administrators encounter are as follows:
1, the Daily maintenance process is not possible to log on to each server and device up to view the log;2, the network device storage space is limited, it is not possible to store a log of too long, and the system problems may be a long time ago some of the operations caused;3, in some
Rsyslog + mysql bitsCN.com
1. install MySQL
A ../configure -- prefix =/usr/local/mysql -- with-charset = utf8
B. make install
2. configure MySQL, add a write-only account and a read-only account. write-only accounts write logs to rsyslog in mysql. read-only accounts are used on front-end web pages.
Grant insert on Syslog. * TO 'rsyslog _ write' @ 'localhost' id
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 director
Features provided by the software: 1. rsyslog is a log service of RHEL or CentOS 6. x, replacing the syslog service of the previous system. In this architecture, the rsyslog service is mainly used to collect logs, classify logs, and write them into the database. 2. mysql is a simple database. In this architecture, the main task is to store the collected log information so that it can be displayed to the log
Rsyslog Introduction:
The Rsyslog service is specifically responsible for recording system log information on CentOS (earlier versions of the system use Syslog,rsyslog as the next generation of syslog), and Rsyslog consists of three parts: syslogd,klogd,logrotate
SYSLOGD The log information of the main records system
Use Rsyslog to collect logs to Kafka
The project needs to collect logs for storage and analysis. The data flow is rsyslog (Collection)-> kafka (Message Queue)-> logstash (cleanup)-> es, hdfs; today, we will first collect logs to kafka using rsyslog.I. Environment preparation
Through viewing the official rsyslog documentation, we know that
When the server encountered a problem, operations engineer will be based on the log to analyze the problem, when hackers invade the server, the basic will delete the log, so as not to leave clues, so that the log is important to the server, so many companies will have their own log server, Let's learn how to build a log server and log Analysis tool.1. The client and server must first be installed Rsyslog this software:[Email protected] ~]# yum-y insta
4.1 Check if the Rsyslog software is installed# Rpm-qa|grep Rsyslog//The software is installed on the default system4.2 Installing Rsyslog modules connected to MySQL database# yum Install Rsyslog-mysql–yRsyslog-mysql a module for Rsyslog to send logs to the MySQL database, w
; Index.php Phpinfo ();?>EofYou can see the PHP information by typing Http://YOURSERVERIP in the browser.7.1 Check if the Rsyslog software is installedRpm-qa|grep Rsyslog//The software is installed on the default system7.2 Installing Rsyslog modules connected to MySQL databaseYum Install Rsyslog-mysql–yRsyslog-mysql a
Tags: relational database Database management application software Server management systemRsyslog Introduction:The Rsyslog service on CentOS is specifically responsible for logging system log information (earlier versions of the system use Syslog,rsyslog as the next-generation version of Syslog), and Rsyslog has three components: Syslogd,klogd,logrotateSYSLOGD m
Build a log server with the Rsyslog service that comes with the centos6.5 systemFirst, the preparation of the pre-construction workInstall LNMP (optional)Configuring network Services (DNS and NTP) helps improve the accuracy of logging efforts.Yum Install-y NTPService NTPD Start/usr/sbin/ntpdate asia.pool.ntp.orgHwclock–systohcSecond, log server installation# yum-y Install Rsyslog
Rsyslog + mysql + loganalyzer build a log server The general idea is as follows: Use the rsyslog service that comes with Linux as the underlying layer, and then use the templates of mysql and rsyslog to store files and display them on the web.
[Root @ localhost ~] # Grep-v '^ #'/etc/rsyslog. conf | grep-v '^ $' $ ModL
The rsyslog mechanism is very powerful, and scattered logs can be aggregated to a log server for ease of viewing and debugging. Installation is very simple:
shell> cd /etc/yum.repos.d/shell> wget http://rpms.adiscon.com/v8-stable/rsyslog.reposhell> yum install rsyslog
The default version of centos6.5 is rsyslog7.x. The latest official version is provided here.
Record the strange problem when
Rsyslog logging in MySQL:Prerequisite: Prepare mSQL server or MARIADB server;(1) Install the Rsyslog driver module connected to MySQL server;# yum Install Rsyslog-mysql(2) Prepare Rsyslog dedicated user account in MySQL server;GRANT all on syslog.* to ' rsyslog ' @ ' 127.0.0
Set up rsyslog log server using centos
The system is centos 6.5x64
Server
Yum install-y rsyslog
Mkdir/data/log
Vi/etc/sysconfig/rsyslog
# SYSLOGD_OPTIONS = "-c 5"
# R indicates that receiving is allowed, x indicates that DNS resolution is not required, and m indicates that 0 is synchronized immediately.
SYSLOGD_OPTIONS = "-r-x-m 0"
Cp/etc/
I. Introduction of RsyslogRyslog is a fast-track process for collecting system logs, providing high performance, security features, and modular design. The Rsyslog is an upgraded version of the syslog, which converts multiple sources of input and output to destinations, and is now able to process 1 million of messages, according to the official website.Features: 1. Multithreading2. Support Encryption protocol: SSL,TLS,RELP3.mysql, Oracle, PostgreSQL4.
I. Introduction of RsyslogRyslog is a fast-track system log program that provides high performance, security features, and modular design. The Rsyslog is an upgraded version of the syslog, which converts multiple sources of input and output to destinations, and is now able to process 1 million of messages, according to the official website.Features: 1. Multithreading2. Support Encryption protocol: SSL,TLS,RELP3.mysql, Oracle, PostgreSQL4. etc...Ii. Pr
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.