Elk-redis Log Server Setup

Source: Internet
Author: User
Tags kibana logstash

Elk+redis build Log Analysis Platform

this is the latest. Elk+redis build a log analysis platform, this year time is - years 9 Month One Day.

Elk respectively for Elasticsearch , Logstash , Kibana

The official website is: https://www.elastic.co/products

Elasticsearch:

Https://www.elastic.co/downloads/elasticsearch
Https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.1.tar.gz

Logstash:

Https://www.elastic.co/downloads/logstash

https://download.elastic.co/logstash/logstash/logstash-1.5.4.tar.gz

Kibana:

Https://www.elastic.co/products/kibana

https://download.elastic.co/kibana/kibana/kibana-4.1.2-linux-x64.tar.gz

let's start with the plan.



192.168.15.62 for the Log view server, the machine needs to install Redis, Elasticserch, Logstatsh, Kibana these four applications.
192.168.15.2 for the application nginx Application, we only collect his logs for analysis this time.

installation

Yum install vim unix2dos wget Curl Curl-devel expect Expect-devel

Yum Install gcc glibc glib2 libgcc glibc-devel glib2-devel

Yum Install M4 automake autoconf cmake cpp

Yum Install gcc-c++ libstdc++ libstdc++-devel libstdc++-docs

in the 192.168.15.62 on the machine:

in Root identity Landing, in Root 's home directory " /root "under:

Wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.1.tar.gz

Wget https://download.elastic.co/logstash/logstash/logstash-1.5.4.tar.gz

Wget https://download.elastic.co/kibana/kibana/kibana-4.1.2-linux-x64.tar.gz

Wget http://download.redis.io/releases/redis-3.0.4.tar.gz

#tar –xvzf redis-3.0.4.tar.gz

#cd redis-3.0.4

#make

#make Install

#cd utils

#./install_server.sh

this Redis It's all set up.
#which redis-server in /usr/local/bin/redis-server

The configuration file is placed in the /etc/redis/6379.conf file

#redis-cli

>set AA Aavalue

>get AA can be tested.
#cd

#tar –xvzf elasticsearch-1.7.1.tar.gz

#cp –a elasticsearch-1.7.1/usr/local

#cd/usr/local

#ln –s elasticsearch-1.7.1 elasticsearch

#cd

#tar –xvzf logstash-1.5.4.tar.gz

#cp –a logstash-1.5.4/usr/local

#cd/usr/local

#ln –s logstash-1.5.4 logstash

#cd

#tar –xvzf kibana-4.1.2-linux-x64.tar.gz

#cp –a kibana-4.1.2-linux-x64/usr/local

#cd/usr/local

#ln –s kibana-4.1.2-linux-x64 Kibana

The program installation is complete.

because Elasticsearch and the Logstash is installed on a single machine so Elasticsearch The default configuration is sufficient.
/usr/local/elasticsearch/bin/elasticsearch–d ( starts in Deamon mode Elasticsearch)
Open 192.168.15.62:9200 to see


Configuration Logstash program
# Cd/usr/local/logstash ,mkdir etc logs two folders,etc for storing configuration files, Logs for storing log files
Create a central.conf configuration file in the etc Directory:


This document is described in Redis for input, output to Elasticsearch program, formatted as JSON Agreement is http.

Start Logstash program
#/usr/local/logstash agent–verbose--config/usr/local/logstash/etc/central.conf–log/usr/local/ Logstash/logs/stdou.log

Kibana program is now 4 version, comes with Web , the port is 5601:

#cd/usr/local/kibana/bin/

#./kibana program can be.

you can now open Kibana 's page.

The server installation is complete and now the client ( 192.168.25.2 ) Collect logs
#cd

#tar –xvzf logstash-1.5.4.tar.gz

#cp –a logstash-1.5.4/usr/local

#cd/usr/local

#ln –s logstash-1.5.4 logstash

#cd/usr/local/logstash Catalogue
It is also necessary to #mkdir etc logs to store configuration files and log files.
Vim logstash_agent.conf


Start the Logstash program can be.
#/usr/local/logstash/bin/logstash–f/usr/local/logstash/etc/logstash_agent.conf


This will pass the log to the log server.
Open http://192.168.15.62:5601. is to open the Kibana page.

Configure:


You can see the logs to send them over.

Elk-redis Log Server Setup

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.