elk-6.1.2 Learning Notes _elasticsearch

Source: Internet
Author: User
Tags kibana logstash
elk-6.1.2 study notes One, the environment Centos7, elasticsearch-6.1.2 installs openjdk-1.8:
Yum Install java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64
Configure Java_home (~/.bash_profile):
# add
java_home=/usr/lib/jvm/java
path= $PATH: $JAVA _home/bin
Modify File:/etc/sysctl.conf
# Execute sysctl-p effective
Vm.max_map_count = 262144
Modify File:/etc/security/limits.conf
# re-login active
esearch soft nofile 65536
esearch hard nofile 131072 esearch soft nproc 2048 esearch hard Nproc
4 096
Modify File/etc/security/limits.d/90-nproc.conf
Esearch Soft Nproc 4096
Add user groups and users, ES cannot run as root
# Add user group
groupadd es
# View user group
cat/etc/group
# Add users and specify group
useradd esearch-g es
# set User password
passwd Esearch
Elk files, extract them separately
Elasticsearch-6.1.2.zip logstash-6.1.2.tar.gz kibana-6.1.2-linux-x86_64.tar.gz Two, decompression Elasticsearch, into the main directory

1. Modify File Config/elasticsearch.yml

# Modify
bootstrap.memory_lock:false
# Add
bootstrap.system_call_filter:false

2. Start

Bin/elasticsearch
# After the way to
start bin/elasticsearch-d

3. Verification: http://localhost:9200 Three, decompression Kibana, into the main directory

1. Start Kibana

Bin/kibana
# start
nohup bin/kibana >/dev/null 2>&1 &

3. Verification: http://localhost:5601 IV, Decompression Logstash, into the main directory

1. Create configuration file my_date.conf, import data from Oracle to Elasticsearch

Input {
  jdbc {
    jdbc_driver_library => "Path/to/ojdbc6.jar"
    jdbc_driver_class => "Java::o Racle.jdbc.driver.OracleDriver "
    jdbc_connection_string =>" Jdbc:oracle:thin: @ip: 1521:orasid "
    jdbc_" User => "Orauser"
    jdbc_password => "orapwd" parameters

    => {"Max_num" =>}
    statement => "SE" Lect level My_rowno, sysdate + level my_date to dual connect by level <: Max_num "
  }
}

output {
  elas Ticsearch {
    hosts => "localhost:9200"
    index => "my_date" document_id =>
    "%{my_rowno}"
  }< c16/>}

2. Start

/bin/logstash-f my_date.conf
Tips

1.elasticsearch-6.1.2/config/elasticsearch.yml

# Configure cluster
cluster.name:mst-application
node.name:node-2
discovery.zen.ping.unicast.hosts: ["ip1", " Ip2 "]
# Specifies access to IP
network.host:0.0.0.0

2.kibana-6.1.2-linux-x86_64/config/kibana.yml

# Specifies access to IP
server.host: "0.0.0.0"

3.elasticsearch structure: index->type->document, one index in version 6 allows only one type

4.index equivalent to database table, document equivalent to database row

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.