Here is a simple local lamp structure, MySQL is used to store the logs sent by the Rsyslog service, PHP is used to run the Loganalyzer program.Loganalyzer is a PHP application used to display logs stored in MySQL.Loganalyzer:Http://download.adiscon.com/loganalyzer/loganalyzer-4.1.3.tar.gzDirectory:1, install lamp.3, MySQL to Rsyslog authorized storage log.Note: time synchronization . Loganalyzer System: Cen
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
information *: All user log servers: @SERVER Pipeline: | COMMAND5. Reference documentsRsyslog Doc:http://www.rsyslog.com/doc/v8-stable/redhat Doc:https://access.redhat.com/documentation/en-us/red_ hat_enterprise_linux/7/html/system_administrators_guide/s1-basic_configuration_of_rsyslog.htmlother:http:// Xmodulo.com/configure-syslog-server-linux.htmlSecond, store logs to the remote database1. Host address AssignmentThe Rsyslog:192.168.1.106client:192.
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
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
1.syslog Introduction:The Log service defaults to syslog on CentOS 5, and all 6 are upgraded to Rsyslog. Rsyslog is an enhanced version of Syslog and offers many advanced features. Syslog consists of two processes, KLOGD and SYSLOGD,KLOGD record kernel generated log information, while SYSLOGD is normal log information. In addition to some advanced features, the overall framework of
Linux Rsyslog System Log forwardingI. 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. Sup
Rsyslog+loganalyer+mysql the deployment log server is ready to work (three CentOS server Centos7):
MySQL server (192.168.1.70): Collect storage Management logs
Web/rsyslog Server (192.168.1.52): Build httpd service, provide view log information on Web side
Test Server (192.168.1.71): Generate logs and send log information to the Rsyslog server
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
Tags: kth admin httpd service appears blank rest theme Pre DataOutput HOST1/2 system logs, log to the MySQL server database, and publish loganalyzer structural relationships such as: Preparatory work:
Vmware
CentOS 7 Minimum System installation image
Loganalyzer Source Package Download
Install three hosts, copy Loganalyzer to MARIADB host
The IP address corresponds to the host relationship table:
MARIADB Host
192.168.142.128/24
HOST1
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.