Kibana is also an open source and free tool that Kibana a friendly Web interface for log analysis that Logstash and ElasticSearch can provide to help you summarize, analyze, and search for important data logs.
Elk Download and installelk:https://www.elastic.co/downloads/
It is recommended to run on Linux, Elk support is not good on Windows, and need jdk1.8 support, need to install the JDK in advance.
After download: Install to Logstash for chestnuts:
Cd/usr/local/mkdir LOGSTASHTAR-ZXVF LOGSTASH-5.3.2.TAR.GZMV Logstash-5.3.2/usr/local/logstash
Configuring, starting ElasticsearchTo open the Elasticsearch configuration file:
Vim Config/elasticsearch.yml
To modify the configuration:
network.host=localhostnetwork.port=9200
It is this configuration by default, no special requirements, no modifications are required locally.
Start Elasticsearch
./bin/elasticsearch
Launch success, access to localhost:9200, Web page display:
{ "name": "56IrTCM", "cluster_name": "Elasticsearch", "Cluster_uuid": "E4ja7vs2tiki1bsggeaa6q", " Version ": { " number ":" 5.2.2 ", " Build_hash ":" F9d9b74 ", " build_date ":" 2017-02-24t17:26:45.835z ", "Build_snapshot": false, "lucene_version": "6.4.1" }, "tagline": "You Know, for Search"}
Configuring, starting LogstashUnder Logstash's home directory:
Modify the log4j_to_es.conf as follows:
Input { log4j { mode = "Server" host = "localhost" port = 4560 }}filter { #Only Matched data is send to output.} Output { Elasticsearch { action = "index" #The operation on ES hosts = "localhost:9200" c11/> #ElasticSearch host, can be array. Index = "Applog" #The Index to write data to. }}
Start after modifying configuration:
The terminal is displayed as follows: