'Stack'에 해당되는 글 13건

  1. 2018.07.25 [Beats] 오랜만에 Filebeat 설치 1
  2. 2016.11.24 [Elasticsearch] Lucene Arirang Analyzer Plugin for Elasticsearch 5.0.1
  3. 2016.03.31 [Kafka] 재미로 본 Elastic Stack과 Kafka 매칭

[Beats] 오랜만에 Filebeat 설치

Elastic/Beats 2018. 7. 25. 20:23

설치환경)

AWS EC2

Ubuntu


다운로드)

https://www.elastic.co/kr/downloads/beats/filebeat

https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.3.1-linux-x86_64.tar.gz


다운 받으시고 그냥 압축 해제 하시면 됩니다.


tree 는 그냥 제 맥북 기준으로 보여 드립니다.


filebeat-6.3.2-darwin-x86_64

├── LICENSE.txt

├── NOTICE.txt

├── README.md

├── fields.yml

├── filebeat

├── filebeat.reference.yml

├── filebeat.yml

├── kibana

│   ├── 5

│   │   ├── dashboard

│   │   │   ├── 0d3f2380-fa78-11e6-ae9b-81e5311e8cab.json

│   │   │   ├── 26309570-2419-11e7-a83b-d5f4cebac9ff.json

│   │   │   ├── 277876d0-fa2c-11e6-bbd3-29c986c96e5a.json

│   │   │   ├── 5517a150-f9ce-11e6-8115-a7c18106d86a.json

│   │   │   ├── 7fea2930-478e-11e7-b1f0-cb29bac6bf8b.json

│   │   │   ├── Filebeat-Apache2-Dashboard.json

│   │   │   ├── Filebeat-MySQL-Dashboard.json

│   │   │   ├── Filebeat-Nginx-Dashboard.json

│   │   │   ├── Filebeat-Traefik-Dashboard.json

│   │   │   ├── Filebeat-syslog-dashboard.json

│   │   │   ├── ML-Nginx-Access-Remote-IP-Count-Explorer.json

│   │   │   ├── ML-Nginx-Remote-IP-URL-Explorer.json

│   │   │   ├── ML-Traefik-Access-Remote-IP-Count-Explorer.json

│   │   │   ├── ML-Traefik-Remote-IP-URL-Explorer.json

│   │   │   ├── b9163ea0-2417-11e7-a83b-d5f4cebac9ff.json

│   │   │   ├── dfbb49f0-0a0f-11e7-8a62-2d05eaaac5cb.json

│   │   │   └── f693d260-2417-11e7-a83b-d5f4cebac9ff.json

│   │   ├── index-pattern

│   │   │   └── filebeat.json

│   │   ├── search

│   │   │   ├── 0ab87b80-478e-11e7-b1f0-cb29bac6bf8b.json

│   │   │   ├── 4ac0a370-0a11-11e7-8b04-eb22a5669f27.json

│   │   │   ├── 62439dc0-f9c9-11e6-a747-6121780e0414.json

│   │   │   ├── 710043e0-2417-11e7-a83b-d5f4cebac9ff.json

│   │   │   ├── 73613570-4791-11e7-be88-2ddb32f3df97.json

│   │   │   ├── 8030c1b0-fa77-11e6-ae9b-81e5311e8cab.json

│   │   │   ├── Apache2-access-logs.json

│   │   │   ├── Apache2-errors-log.json

│   │   │   ├── Filebeat-MySQL-Slow-log.json

│   │   │   ├── Filebeat-MySQL-error-log.json

│   │   │   ├── Filebeat-Nginx-module.json

│   │   │   ├── Filebeat-Traefik-module.json

│   │   │   ├── ML-Filebeat-Nginx-Access.json

│   │   │   ├── ML-Filebeat-Traefik-Access.json

│   │   │   ├── Syslog-system-logs.json

│   │   │   ├── b6f321e0-fa25-11e6-bbd3-29c986c96e5a.json

│   │   │   ├── c876e6a0-2418-11e7-a83b-d5f4cebac9ff.json

│   │   │   ├── eb0039f0-fa7f-11e6-a1df-a78bd7504d38.json

│   │   │   └── ffaf5a30-2413-11e7-a0d9-39604d45ca7f.json

│   │   └── visualization

│   │       ├── 0bc34b60-2419-11e7-a83b-d5f4cebac9ff.json

│   │       ├── 12667040-fa80-11e6-a1df-a78bd7504d38.json

│   │       ├── 2bb0fa70-0a11-11e7-9e84-43da493ad0c7.json

│   │       ├── 2cf77780-2418-11e7-a83b-d5f4cebac9ff.json

│   │       ├── 341ffe70-f9ce-11e6-8115-a7c18106d86a.json

│   │       ├── 346bb290-fa80-11e6-a1df-a78bd7504d38.json

│   │       ├── 3cec3eb0-f9d3-11e6-8a3e-2b904044ea1d.json

│   │       ├── 51164310-fa2b-11e6-bbd3-29c986c96e5a.json

│   │       ├── 5c7af030-fa2a-11e6-bbd3-29c986c96e5a.json

│   │       ├── 5dd15c00-fa78-11e6-ae9b-81e5311e8cab.json

│   │       ├── 5ebdbe50-0a0f-11e7-825f-6748cda7d858.json

│   │       ├── 6295bdd0-0a0e-11e7-825f-6748cda7d858.json

│   │       ├── 78b74f30-f9cd-11e6-8115-a7c18106d86a.json

│   │       ├── 78b9afe0-478f-11e7-b1f0-cb29bac6bf8b.json

│   │       ├── Apache2-access-unique-IPs-map.json

│   │       ├── Apache2-browsers.json

│   │       ├── Apache2-error-logs-over-time.json

│   │       ├── Apache2-operating-systems.json

│   │       ├── Apache2-response-codes-of-top-URLs.json

│   │       ├── Apache2-response-codes-over-time.json

│   │       ├── Errors-over-time.json

│   │       ├── ML-Nginx-Access-Map.json

│   │       ├── ML-Nginx-Access-Remote-IP-Timechart.json

│   │       ├── ML-Nginx-Access-Response-Code-Timechart.json

│   │       ├── ML-Nginx-Access-Top-Remote-IPs-Table.json

│   │       ├── ML-Nginx-Access-Top-URLs-Table.json

│   │       ├── ML-Nginx-Access-Unique-Count-URL-Timechart.json

│   │       ├── ML-Traefik-Access-Map.json

│   │       ├── ML-Traefik-Access-Remote-IP-Timechart.json

│   │       ├── ML-Traefik-Access-Response-Code-Timechart.json

│   │       ├── ML-Traefik-Access-Top-Remote-IPs-Table.json

│   │       ├── ML-Traefik-Access-Top-URLs-Table.json

│   │       ├── ML-Traefik-Access-Unique-Count-URL-Timechart.json

│   │       ├── MySQL-Error-logs-levels.json

│   │       ├── MySQL-Slow-logs-by-count.json

│   │       ├── MySQL-Slow-queries-over-time.json

│   │       ├── MySQL-error-logs.json

│   │       ├── MySQL-slowest-queries.json

│   │       ├── New-Visualization.json

│   │       ├── Nginx-Access-Browsers.json

│   │       ├── Nginx-Access-Map.json

│   │       ├── Nginx-Access-OSes.json

│   │       ├── Nginx-Access-Response-codes-by-top-URLs.json

│   │       ├── Sent-sizes.json

│   │       ├── Syslog-events-by-hostname.json

│   │       ├── Syslog-hostnames-and-processes.json

│   │       ├── Traefik-Access-Browsers.json

│   │       ├── Traefik-Access-Map.json

│   │       ├── Traefik-Access-OSes.json

│   │       ├── Traefik-Access-Response-codes-by-top-URLs.json

│   │       ├── a59b5e00-2417-11e7-a83b-d5f4cebac9ff.json

│   │       ├── c5411910-0a87-11e7-8b04-eb22a5669f27.json

│   │       ├── d16bb400-f9cc-11e6-8115-a7c18106d86a.json

│   │       ├── d1726930-0a7f-11e7-8b04-eb22a5669f27.json

│   │       ├── d2864600-478f-11e7-be88-2ddb32f3df97.json

│   │       ├── d56ee420-fa79-11e6-a1df-a78bd7504d38.json

│   │       ├── d8e5dc40-2417-11e7-a83b-d5f4cebac9ff.json

│   │       ├── dc589770-fa2b-11e6-bbd3-29c986c96e5a.json

│   │       ├── dcccaa80-4791-11e7-be88-2ddb32f3df97.json

│   │       ├── e121b140-fa78-11e6-a1df-a78bd7504d38.json

│   │       ├── f398d2f0-fa77-11e6-ae9b-81e5311e8cab.json

│   │       └── fb09d4b0-2418-11e7-a83b-d5f4cebac9ff.json

│   └── 6

│       ├── dashboard

│       │   ├── Filebeat-Kafka-overview.json

│       │   ├── Filebeat-Mongodb-overview.json

│       │   ├── Filebeat-Postgresql-overview.json

│       │   ├── Filebeat-Postgresql-slowlogs.json

│       │   ├── Filebeat-apache2.json

│       │   ├── Filebeat-auditd.json

│       │   ├── Filebeat-auth-sudo-commands.json

│       │   ├── Filebeat-icinga-debug-log.json

│       │   ├── Filebeat-icinga-main-log.json

│       │   ├── Filebeat-icinga-startup-errors.json

│       │   ├── Filebeat-iis.json

│       │   ├── Filebeat-logstash-log.json

│       │   ├── Filebeat-logstash-slowlog.json

│       │   ├── Filebeat-mysql.json

│       │   ├── Filebeat-new-users-and-groups.json

│       │   ├── Filebeat-nginx-logs.json

│       │   ├── Filebeat-nginx-overview.json

│       │   ├── Filebeat-redis.json

│       │   ├── Filebeat-ssh-login-attempts.json

│       │   ├── Filebeat-syslog.json

│       │   ├── Filebeat-traefik-overview.json

│       │   ├── ml-nginx-access-remote-ip-count-explorer.json

│       │   ├── ml-nginx-remote-ip-url-explorer.json

│       │   ├── ml-traefik-access-remote-ip-count-explorer.json

│       │   ├── ml-traefik-remote-ip-url-explorer.json

│       │   ├── osquery-compliance.json

│       │   └── osquery-rootkit.json

│       └── index-pattern

│           └── filebeat.json

├── module

│   ├── apache2

│   │   ├── access

│   │   │   ├── config

│   │   │   │   └── access.yml

│   │   │   ├── ingest

│   │   │   │   └── default.json

│   │   │   └── manifest.yml

│   │   ├── error

│   │   │   ├── config

│   │   │   │   └── error.yml

│   │   │   ├── ingest

│   │   │   │   └── pipeline.json

│   │   │   └── manifest.yml

│   │   └── module.yml

│   ├── auditd

│   │   ├── log

│   │   │   ├── config

│   │   │   │   └── log.yml

│   │   │   ├── ingest

│   │   │   │   └── pipeline.json

│   │   │   └── manifest.yml

│   │   └── module.yml

│   ├── icinga

│   │   ├── debug

│   │   │   ├── config

│   │   │   │   └── debug.yml

│   │   │   ├── ingest

│   │   │   │   └── pipeline.json

│   │   │   └── manifest.yml

│   │   ├── main

│   │   │   ├── config

│   │   │   │   └── main.yml

│   │   │   ├── ingest

│   │   │   │   └── pipeline.json

│   │   │   └── manifest.yml

│   │   ├── module.yml

│   │   └── startup

│   │       ├── config

│   │       │   └── startup.yml

│   │       ├── ingest

│   │       │   └── pipeline.json

│   │       └── manifest.yml

│   ├── iis

│   │   ├── access

│   │   │   ├── config

│   │   │   │   └── iis-access.yml

│   │   │   ├── ingest

│   │   │   │   └── default.json

│   │   │   └── manifest.yml

│   │   └── error

│   │       ├── config

│   │       │   └── iis-error.yml

│   │       ├── ingest

│   │       │   └── default.json

│   │       └── manifest.yml

│   ├── kafka

│   │   ├── log

│   │   │   ├── config

│   │   │   │   └── log.yml

│   │   │   ├── ingest

│   │   │   │   └── pipeline.json

│   │   │   └── manifest.yml

│   │   └── module.yml

│   ├── logstash

│   │   ├── log

│   │   │   ├── config

│   │   │   │   └── log.yml

│   │   │   ├── ingest

│   │   │   │   ├── pipeline-json.json

│   │   │   │   └── pipeline-plain.json

│   │   │   └── manifest.yml

│   │   ├── module.yml

│   │   └── slowlog

│   │       ├── config

│   │       │   └── slowlog.yml

│   │       ├── ingest

│   │       │   ├── pipeline-json.json

│   │       │   └── pipeline-plain.json

│   │       └── manifest.yml

│   ├── mongodb

│   │   ├── log

│   │   │   ├── config

│   │   │   │   └── log.yml

│   │   │   ├── ingest

│   │   │   │   └── pipeline.json

│   │   │   └── manifest.yml

│   │   └── module.yml

│   ├── mysql

│   │   ├── error

│   │   │   ├── config

│   │   │   │   └── error.yml

│   │   │   ├── ingest

│   │   │   │   └── pipeline.json

│   │   │   └── manifest.yml

│   │   ├── module.yml

│   │   └── slowlog

│   │       ├── config

│   │       │   └── slowlog.yml

│   │       ├── ingest

│   │       │   └── pipeline.json

│   │       └── manifest.yml

│   ├── nginx

│   │   ├── access

│   │   │   ├── config

│   │   │   │   └── nginx-access.yml

│   │   │   ├── ingest

│   │   │   │   └── default.json

│   │   │   ├── machine_learning

│   │   │   │   ├── datafeed_low_request_rate.json

│   │   │   │   ├── datafeed_remote_ip_request_rate.json

│   │   │   │   ├── datafeed_remote_ip_url_count.json

│   │   │   │   ├── datafeed_response_code.json

│   │   │   │   ├── datafeed_visitor_rate.json

│   │   │   │   ├── low_request_rate.json

│   │   │   │   ├── remote_ip_request_rate.json

│   │   │   │   ├── remote_ip_url_count.json

│   │   │   │   ├── response_code.json

│   │   │   │   └── visitor_rate.json

│   │   │   └── manifest.yml

│   │   ├── error

│   │   │   ├── config

│   │   │   │   └── nginx-error.yml

│   │   │   ├── ingest

│   │   │   │   └── pipeline.json

│   │   │   └── manifest.yml

│   │   └── module.yml

│   ├── osquery

│   │   ├── module.yml

│   │   └── result

│   │       ├── config

│   │       │   └── result.yml

│   │       ├── ingest

│   │       │   └── pipeline.json

│   │       └── manifest.yml

│   ├── postgresql

│   │   ├── log

│   │   │   ├── config

│   │   │   │   └── log.yml

│   │   │   ├── ingest

│   │   │   │   └── pipeline.json

│   │   │   └── manifest.yml

│   │   └── module.yml

│   ├── redis

│   │   ├── log

│   │   │   ├── config

│   │   │   │   └── log.yml

│   │   │   ├── ingest

│   │   │   │   └── pipeline.json

│   │   │   └── manifest.yml

│   │   ├── module.yml

│   │   └── slowlog

│   │       ├── config

│   │       │   └── slowlog.yml

│   │       ├── ingest

│   │       │   └── pipeline.json

│   │       └── manifest.yml

│   ├── system

│   │   ├── auth

│   │   │   ├── config

│   │   │   │   └── auth.yml

│   │   │   ├── ingest

│   │   │   │   └── pipeline.json

│   │   │   └── manifest.yml

│   │   ├── module.yml

│   │   └── syslog

│   │       ├── config

│   │       │   └── syslog.yml

│   │       ├── ingest

│   │       │   └── pipeline.json

│   │       └── manifest.yml

│   └── traefik

│       ├── access

│       │   ├── config

│       │   │   └── traefik-access.yml

│       │   ├── ingest

│       │   │   └── pipeline.json

│       │   ├── machine_learning

│       │   │   ├── datafeed_low_request_rate.json

│       │   │   ├── datafeed_remote_ip_request_rate.json

│       │   │   ├── datafeed_remote_ip_url_count.json

│       │   │   ├── datafeed_response_code.json

│       │   │   ├── datafeed_visitor_rate.json

│       │   │   ├── low_request_rate.json

│       │   │   ├── remote_ip_request_rate.json

│       │   │   ├── remote_ip_url_count.json

│       │   │   ├── response_code.json

│       │   │   └── visitor_rate.json

│       │   ├── manifest.yml

│       │   └── tests

│       │       ├── test.log

│       │       └── test.log-expected.json

│       └── module.yml

└── modules.d

    ├── apache2.yml.disabled

    ├── auditd.yml.disabled

    ├── icinga.yml.disabled

    ├── iis.yml.disabled

    ├── kafka.yml.disabled

    ├── logstash.yml.disabled

    ├── mongodb.yml.disabled

    ├── mysql.yml.disabled

    ├── nginx.yml.disabled

    ├── osquery.yml.disabled

    ├── postgresql.yml.disabled

    ├── redis.yml.disabled

    ├── system.yml.disabled

    └── traefik.yml.disabled


97 directories, 254 files


도움말)

Usage:

  filebeat [flags]

  filebeat [command]


Available Commands:

  export      Export current config or index template

  help        Help about any command

  keystore    Manage secrets keystore

  modules     Manage configured modules

  run         Run filebeat

  setup       Setup index template, dashboards and ML jobs

  test        Test config

  version     Show current version info


Flags:

  -E, --E setting=value      Configuration overwrite

  -M, --M setting=value      Module configuration overwrite

  -N, --N                    Disable actual publishing for testing

  -c, --c string             Configuration file, relative to path.config (default "filebeat.yml")

      --cpuprofile string    Write cpu profile to file

  -d, --d string             Enable certain debug selectors

  -e, --e                    Log to stderr and disable syslog/file output

  -h, --help                 help for filebeat

      --httpprof string      Start pprof http server

      --memprofile string    Write memory profile to this file

      --modules string       List of enabled modules (comma separated)

      --once                 Run filebeat only once until all harvesters reach EOF

      --path.config string   Configuration path

      --path.data string     Data path

      --path.home string     Home path

      --path.logs string     Logs path

      --setup                Load sample Kibana dashboards and setup Machine Learning

      --strict.perms         Strict permission checking on config files (default true)

  -v, --v                    Log at INFO level


Use "filebeat [command] --help" for more information about a command.


filebeat.yml 예제)

filebeat:

  prospectors:

    -

      paths:

        - /mnt/apps/apache-tomcat/logs/catalina.out

      encoding: utf-8

      input_type: log


      exclude_lines: ['DEBUG', 'INFO']

      include_lines: ['(E|e)rror', 'ERROR', '(E|e)xception', 'EXCEPTION']


      document_type: error-log


      ignore_older: 5m


      scan_frequency: 10s


      multiline:

        pattern: '^[[:space:]]+|^Caused by:'

        negate: false

        match: after

        max_lines: 10

        timeout: 5s


      tail_files: true


      backoff: 1s

      max_backoff: 10s

      backoff_factor: 2


  registry_file: /mnt/config/filebeat/.filebeat-tomcat


output:

  logstash:

    hosts: ["localhost:5044"]


shipper:


logging:

  to_syslog: false

  to_files: true


  level: warning


  files:

    path: /mnt/logs/filebeat

    name: filebeat-tomcat.log

    rotateeverybytes: 10485760 # = 10MB


logstash 예제)

input {

  beats {

    port => 5044

  }

}


output {

  stdout { codec => rubydebug }


  http {

    url => "https://slack.com/api/chat.postMessage"

    content_type => "application/json"

    http_method => "post"

    format => "json"

    mapping => [ "channel", "slack-bot", "text", "%{message}" ]

    headers => ["Authorization", "Bearer xoxb-XXXXXXXXXXXXXXXXXXXXX"]

  }

#  elasticsearch {

#    host => "localhost"

#    port => "9200"

#    protocol => "http"

#    index => "%{[@metadata][index]}"

#    document_type => "%{[@metadata][type]}"

#  }

}


위 예제는 그냥 filebeat 이 log file 을 리스닝 하고 있다가 error 또는 exception 발생 시 바로 slack 으로 해당 에러는 보내주는 예제 입니다.

:

[Elasticsearch] Lucene Arirang Analyzer Plugin for Elasticsearch 5.0.1

Elastic/Elasticsearch 2016. 11. 24. 19:02

우선 빌드한 플러그인 zip 파일 먼저 공유 합니다.

나중에 작업한 내용에 대해서는 github 에 올리도록 하겠습니다.

요즘 프로젝트며 운영 업무가 너무 많아서 이것도 겨우 겨우 시간 내서 작업 했내요.


elasticsearch-analysis-arirang-5.0.1.zip


설치 방법)

$ bin/elasticsearch-plugin install --verbose file:///elasticsearch-analysis-arirang/target/elasticsearch-analysis-arirang-5.0.1.zip


설치 로그)

-> Downloading file:///elasticsearch-analysis-arirang-5.0.1.zip

Retrieving zip from file:///elasticsearch-analysis-arirang-5.0.1.zip

[=================================================] 100%

- Plugin information:

Name: analysis-arirang

Description: Arirang plugin

Version: 5.0.1

 * Classname: org.elasticsearch.plugin.analysis.arirang.AnalysisArirangPlugin

-> Installed analysis-arirang


Elasticsearch 실행 로그)

$ bin/elasticsearch

[2016-11-24T18:49:09,922][INFO ][o.e.n.Node               ] [] initializing ...

[2016-11-24T18:49:10,083][INFO ][o.e.e.NodeEnvironment    ] [aDGu2B9] using [1] data paths, mounts [[/ (/dev/disk1)]], net usable_space [733.1gb], net total_space [930.3gb], spins? [unknown], types [hfs]

[2016-11-24T18:49:10,084][INFO ][o.e.e.NodeEnvironment    ] [aDGu2B9] heap size [1.9gb], compressed ordinary object pointers [true]

[2016-11-24T18:49:10,085][INFO ][o.e.n.Node               ] [aDGu2B9] node name [aDGu2B9] derived from node ID; set [node.name] to override

[2016-11-24T18:49:10,087][INFO ][o.e.n.Node               ] [aDGu2B9] version[5.0.1], pid[56878], build[080bb47/2016-11-11T22:08:49.812Z], OS[Mac OS X/10.12.1/x86_64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_72/25.72-b15]

[2016-11-24T18:49:11,335][INFO ][o.e.p.PluginsService     ] [aDGu2B9] loaded module [aggs-matrix-stats]

[2016-11-24T18:49:11,335][INFO ][o.e.p.PluginsService     ] [aDGu2B9] loaded module [ingest-common]

[2016-11-24T18:49:11,335][INFO ][o.e.p.PluginsService     ] [aDGu2B9] loaded module [lang-expression]

[2016-11-24T18:49:11,335][INFO ][o.e.p.PluginsService     ] [aDGu2B9] loaded module [lang-groovy]

[2016-11-24T18:49:11,335][INFO ][o.e.p.PluginsService     ] [aDGu2B9] loaded module [lang-mustache]

[2016-11-24T18:49:11,336][INFO ][o.e.p.PluginsService     ] [aDGu2B9] loaded module [lang-painless]

[2016-11-24T18:49:11,336][INFO ][o.e.p.PluginsService     ] [aDGu2B9] loaded module [percolator]

[2016-11-24T18:49:11,336][INFO ][o.e.p.PluginsService     ] [aDGu2B9] loaded module [reindex]

[2016-11-24T18:49:11,336][INFO ][o.e.p.PluginsService     ] [aDGu2B9] loaded module [transport-netty3]

[2016-11-24T18:49:11,336][INFO ][o.e.p.PluginsService     ] [aDGu2B9] loaded module [transport-netty4]

[2016-11-24T18:49:11,336][INFO ][o.e.p.PluginsService     ] [aDGu2B9] loaded plugin [analysis-arirang]

[2016-11-24T18:49:14,151][INFO ][o.e.n.Node               ] [aDGu2B9] initialized

[2016-11-24T18:49:14,151][INFO ][o.e.n.Node               ] [aDGu2B9] starting ...

[2016-11-24T18:49:14,377][INFO ][o.e.t.TransportService   ] [aDGu2B9] publish_address {127.0.0.1:9300}, bound_addresses {[fe80::1]:9300}, {[::1]:9300}, {127.0.0.1:9300}

[2016-11-24T18:49:17,511][INFO ][o.e.c.s.ClusterService   ] [aDGu2B9] new_master {aDGu2B9}{aDGu2B9mQ8KkWCe3fnqeMw}{_y9RzyKGSvqYAFcv99HBXg}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)

[2016-11-24T18:49:17,584][INFO ][o.e.g.GatewayService     ] [aDGu2B9] recovered [0] indices into cluster_state

[2016-11-24T18:49:17,588][INFO ][o.e.h.HttpServer         ] [aDGu2B9] publish_address {127.0.0.1:9200}, bound_addresses {[fe80::1]:9200}, {[::1]:9200}, {127.0.0.1:9200}

[2016-11-24T18:49:17,588][INFO ][o.e.n.Node               ] [aDGu2B9] started


한글형태소분석 실행)

$ curl -X POST -H "Cache-Control: no-cache" -H "Postman-Token: 6d392d83-5816-71ad-556b-5cd6f92af634" -d '{

  "analyzer" : "arirang_analyzer",

  "text" : "[한국] 엘라스틱서치 사용자 그룹의 HENRY 입니다."

}' "http://localhost:9200/_analyze"


형태소분석 결과)

{

  "tokens": [

    {

      "token": "[",

      "start_offset": 0,

      "end_offset": 1,

      "type": "symbol",

      "position": 0

    },

    {

      "token": "한국",

      "start_offset": 1,

      "end_offset": 3,

      "type": "korean",

      "position": 1

    },

    {

      "token": "]",

      "start_offset": 3,

      "end_offset": 4,

      "type": "symbol",

      "position": 2

    },

    {

      "token": "엘라스틱서치",

      "start_offset": 5,

      "end_offset": 11,

      "type": "korean",

      "position": 3

    },

    {

      "token": "엘라",

      "start_offset": 5,

      "end_offset": 7,

      "type": "korean",

      "position": 3

    },

    {

      "token": "스틱",

      "start_offset": 7,

      "end_offset": 9,

      "type": "korean",

      "position": 4

    },

    {

      "token": "서치",

      "start_offset": 9,

      "end_offset": 11,

      "type": "korean",

      "position": 5

    },

    {

      "token": "사용자",

      "start_offset": 12,

      "end_offset": 15,

      "type": "korean",

      "position": 6

    },

    {

      "token": "그룹",

      "start_offset": 16,

      "end_offset": 18,

      "type": "korean",

      "position": 7

    },

    {

      "token": "henry",

      "start_offset": 20,

      "end_offset": 25,

      "type": "word",

      "position": 8

    },

    {

      "token": "입니다",

      "start_offset": 26,

      "end_offset": 29,

      "type": "korean",

      "position": 9

    }

  ]

}


:

[Kafka] 재미로 본 Elastic Stack과 Kafka 매칭

ITWeb/개발일반 2016. 3. 31. 18:16

그냥 재미로 한번 매칭해 봤습니다.

크게 의미는 없으니 재미로 봐주세요.


Kafka)


Elastic Stack)



 Elastic Stack

 Kafka

 logstash, beats

 producer

 elasticsearch cluster

 cluster (broker + zk)

 logstash

 consumer

 index

 topic 

 shard

 partition

 document id

 offset 

 index.number_of_replicas

 --replication-factors

 index.number_of_shards

 --partitions


저는 이해하기 쉬운데 저만 그런가요??


: