http://jjeong.tistory.com/816 참고가됨
-
This is Slide 1 Title
This is slide 1 description. Go to Edit HTML and replace these sentences with your own words. This is a Blogger template by Lasantha - PremiumBloggerTemplates.com...
-
This is Slide 2 Title
This is slide 2 description. Go to Edit HTML and replace these sentences with your own words. This is a Blogger template by Lasantha - PremiumBloggerTemplates.com...
-
This is Slide 3 Title
This is slide 3 description. Go to Edit HTML and replace these sentences with your own words. This is a Blogger template by Lasantha - PremiumBloggerTemplates.com...
2018년 4월 22일 일요일
2018년 4월 19일 목요일
logstash 아파치 apache 설정
http://hhjeong.tistory.com/109
설정파일 : logstash-apache.config
input {
file {
path => "C:\Bitnami\elk-6.2.3-0\apache2\logs\access.log"
start_position => beginning
}
}
filter {
if [path] =~ "access" {
mutate { replace => { type => "apache_access" } }
grok {
match => { "message" => "%{COMMONAPACHELOG}" }
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
locale => en
}
useragent {
source => "agent"
target => "useragent"
}
} else if [path] =~ "error" {
mutate { replace => { type => "apache_error" } }
} else {
mutate { replace => { type => "random_logs" } }
}
}
output {
elasticsearch {
hosts => [ "127.0.0.1:9200" ]
}
stdout { codec => rubydebug }
}
출처: http://hhjeong.tistory.com/109 [후니의 개발일지]
설정파일 : logstash-apache.config
input {
file {
path => "C:\Bitnami\elk-6.2.3-0\apache2\logs\access.log"
start_position => beginning
}
}
filter {
if [path] =~ "access" {
mutate { replace => { type => "apache_access" } }
grok {
match => { "message" => "%{COMMONAPACHELOG}" }
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
locale => en
}
useragent {
source => "agent"
target => "useragent"
}
} else if [path] =~ "error" {
mutate { replace => { type => "apache_error" } }
} else {
mutate { replace => { type => "random_logs" } }
}
}
output {
elasticsearch {
hosts => [ "127.0.0.1:9200" ]
}
stdout { codec => rubydebug }
}
출처: http://hhjeong.tistory.com/109 [후니의 개발일지]
ElasticSearch Head Plugin window 에서 설치 실행
참고
https://qiita.com/tobesan/items/847d864d7eff0b76d7db
요약
https://qiita.com/tobesan/items/847d864d7eff0b76d7db
요약
- コマンドプロンプトに
git clone https://github.com/mobz/elasticsearch-head.git
と入力し、elasticsearch-headフォルダをダウンロード
参考資料にはgit://github.com/mobz/elasticsearch-head.git
と記載があるが、エラーが起きる場合は上記を使用。 - elasticsearch-headのフォルダに入る
cd elasticsearch-head
- インストール
npm install
- 動かす
npm run start
단 , 엘라스틱 설정에서
http.port : 9200
http.cors.enabled : true
http.cors.allow-origin : /http://localhost(:[0-9]+)?/
http.cors.enabled : true
http.cors.allow-origin : /http://localhost(:[0-9]+)?/
를 추가하는센스
2018년 4월 17일 화요일
2018년 4월 5일 목요일
ELK 운영팁
- 설정세팅예제
http://gametech.tistory.com/50 - 9 tips on ElasticSearch configuration for high performance
https://www.loggly.com/blog/nine-tips-configuring-elasticsearch-for-high-performance/ - [es] and, or보다는 bool 사용하기
http://knight76.tistory.com/entry/es-and-or%EB%B3%B4%EB%8B%A4%EB%8A%94-bool-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0?category=587994 - Elasticsearch 설치 시 vm.max_map_count
http://tod2.tistory.com/185 - [elasticsearch] 실행시 초기화 실패 해결하기
http://knight76.tistory.com/entry/elasticsearch-%EC%8B%A4%ED%96%89%EC%8B%9C-%EC%B4%88%EA%B8%B0%ED%99%94-%EC%8B%A4%ED%8C%A8-%ED%95%B4%EA%B2%B0%ED%95%98%EA%B8%B0?category=587994?category=587994 - [elasticsearch5] 집계 (aggregation) 성능 향상
http://knight76.tistory.com/entry/elasticsearch5-%EC%A7%91%EA%B3%84-aggregation-%EC%84%B1%EB%8A%A5-%ED%96%A5%EC%83%81?category=587994 - [Elasticsearch] Merge Throttle 설정 튜닝
http://jjeong.tistory.com/1045 - Elasticsearch 290개자료
http://jjeong.tistory.com/category/Elastic/Elasticsearch
2018년 4월 2일 월요일
2018년 3월 31일 토요일
ELK 테스트 해본자료
갠적으로 따라하기 쉬웠던 곳
-Logstash 설치 및 사용법
http://brownbears.tistory.com/67
-(3) ELKR (ElasticSearch + Logstash + Kibana + Redis) 로그 분석 시스템
http://blog.plura.io/?p=3363
-Logstash Configuration Examples
http://blog.naver.com/PostView.nhn?blogId=hanajava&logNo=221012261799&categoryNo=74&parentCategoryNo=0&viewDate=¤tPage=1&postListTopCurrentPage=1&from=postView
-grok 란
http://sjh836.tistory.com/69
-ELK 심플하게 설명(주제-설명)
http://heowc.tistory.com/49
-순천향 학교자료
http://cs.sch.ac.kr/lecture/BigData/2017/10-Logstash.pdf
-ELK 요약
http://enterkey.tistory.com/379
-Logstash,MYSQL
https://qbox.io/blog/mysql-logs-elasticsearch-logstash-kibana
여기보고했느데, 6.2 에서 에러가 나서
코덱 부분만 이렇게 바꾸면됨.
input {
file {
path => ["/var/log/mysqld.log"]
codec => multiline {
pattern => "^%{NUMBER} *%{NUMBER}"
negate => true
what => "previous"
}
}
}
---------------------
Elasticsearch6.2 버젼에서는 mapping.json 부터가 안된다.왜.ㅆㅂㄴㄷㅇ
Rejecting mapping update to [products] as the final mapping would have more than 1 type: [item, item_price]"}
요따구 에러가..여기서 than 1 type 인데 ES 는 TYPE 이 테이블이다..즉, 테이블이 두개란다. 칙쇼 같은것들 그냥 RDB 나 아예 다른용어쓰지..하긴..near realtime 이란 병신같은 말도 지어냈으니..ES 만든ㅆㅂㄴ은 식당에서 계산할떄 9999원 내며 거의 만원이니까 그냥 내도 되죠? 라고 하나?
https://medium.com/@federicopanini/elasticsearch-6-0-removal-of-mapping-types-526a67ff772
여기를 참고해보면, 일단 index 의 이름을 중괄호로 mappings {} 를 감싸주면된다.
"mappings": {
"restaurant": {
"properties": {
}
를
"ldgourmet":{
"aliases": {},
"mappings": {
"restaurant": {
"properties": {
}
식으로
그리고 boolean 타입과 string -> text 바뀐타입 체크
curl -XPUT 'http://localhost:9200/ldgourmet' -H "Content-Type: application/json" -d @mapping.json
일케 실행하면..
-----
-Logstash 설치 및 사용법
http://brownbears.tistory.com/67
-(3) ELKR (ElasticSearch + Logstash + Kibana + Redis) 로그 분석 시스템
http://blog.plura.io/?p=3363
-Logstash Configuration Examples
http://blog.naver.com/PostView.nhn?blogId=hanajava&logNo=221012261799&categoryNo=74&parentCategoryNo=0&viewDate=¤tPage=1&postListTopCurrentPage=1&from=postView
-grok 란
http://sjh836.tistory.com/69
-ELK 심플하게 설명(주제-설명)
http://heowc.tistory.com/49
-순천향 학교자료
http://cs.sch.ac.kr/lecture/BigData/2017/10-Logstash.pdf
-ELK 요약
http://enterkey.tistory.com/379
-Logstash,MYSQL
https://qbox.io/blog/mysql-logs-elasticsearch-logstash-kibana
여기보고했느데, 6.2 에서 에러가 나서
코덱 부분만 이렇게 바꾸면됨.
input {
file {
path => ["/var/log/mysqld.log"]
codec => multiline {
pattern => "^%{NUMBER} *%{NUMBER}"
negate => true
what => "previous"
}
}
}
---------------------
Elasticsearch6.2 버젼에서는 mapping.json 부터가 안된다.왜.ㅆㅂㄴㄷㅇ
Rejecting mapping update to [products] as the final mapping would have more than 1 type: [item, item_price]"}
요따구 에러가..여기서 than 1 type 인데 ES 는 TYPE 이 테이블이다..즉, 테이블이 두개란다. 칙쇼 같은것들 그냥 RDB 나 아예 다른용어쓰지..하긴..near realtime 이란 병신같은 말도 지어냈으니..ES 만든ㅆㅂㄴ은 식당에서 계산할떄 9999원 내며 거의 만원이니까 그냥 내도 되죠? 라고 하나?
https://medium.com/@federicopanini/elasticsearch-6-0-removal-of-mapping-types-526a67ff772
여기를 참고해보면, 일단 index 의 이름을 중괄호로 mappings {} 를 감싸주면된다.
"mappings": {
"restaurant": {
"properties": {
}
를
"ldgourmet":{
"aliases": {},
"mappings": {
"restaurant": {
"properties": {
}
식으로
그리고 boolean 타입과 string -> text 바뀐타입 체크
curl -XPUT 'http://localhost:9200/ldgourmet' -H "Content-Type: application/json" -d @mapping.json
일케 실행하면..
-----
yellow open ldgourmet viHSs2n9SzK1TEZ4K5RHsA 5 1 0 0 1.1kb 1.1kb
---생성되었다..
https://qiita.com/morin_river/items/a78f7c85030984222e5e 이사람도 뭔가 써놓긴했는데 자세하진않았고.
2018년 3월 30일 금요일
ELK Filebeat, AWStats 설치
CentOS 7에 ELK, Filebeat, AWStats 설치 후 웹 로그 및 쉘 명령어 분석하기
https://handongchoi.com/2017/10/28/install-elk/무엇보다 , post 의 body 를 로그에 남길수있게 한다는 것이 신기.
ELK 스택에서 CPU 점유율이 높을때,메모리줄이기
- ELK 스택에서 CPU 점유율이 높을때
http://se-you.tistory.com/2 - Elasticsearchのメモリ使用量を減らす
https://www.karakaram.com/elasticsearch-memory-usage-reduce
2018년 3월 21일 수요일
엘라스틱서치 실무 예제, 등 링크모음
총정리
EMOCON 2015 F/W ELK 스택을 사용한 서울시 지하철 대시보드 만들기
https://www.youtube.com/watch?v=ec-XzM6_CgU&feature=youtu.be
ElasticSearch 기본 개념부터
- (*)공식사이트
https://www.elastic.co/kr/products/elasticsearch - (*****)엘라스틱서치 이해하기 20160613
https://www.slideshare.net/dahlmoon/20160613
Elasticsearch 강좌
- (*****)인프런 강좌:무료이고 상세한 기본설명
https://www.inflearn.com/course/elk-%EC%8A%A4%ED%83%9D-%EB%8D%B0%EC%9D%B4%ED%84%B0-%EB%B6%84%EC%84%9D/ - (*)Elasticsearch 설치 및 기본 활용:초간단 Slideshare 자료
https://www.slideshare.net/kjmorc/elasticsearch-32431191 - (*****)elasticsearch_적용 및 활용_정리
https://www.slideshare.net/JunyiSong1/elasticsearch-45936425 - (***)김종민-나만의 Elasticsearch Beats 만들기
https://www.youtube.com/watch?v=N3NbYQgiUn0 - (***)설치후 리눅스에 서비스 설정
https://qiita.com/surdonsan/items/7c8ef915110cd5154474
https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html 버젼참고 - (***)간단사용법
https://okky.kr/article/328309
Elasticsearch 응용 & 최적화
- 일본식당DB를 활용한 elasticsearch 샘플제작
https://github.com/kakakakakku/elasticsearch-hands-on/blob/master/README.md
https://github.com/livedoor/datasets - (*****)[2D1]Elasticsearch 성능 최적화
https://www.slideshare.net/deview/2d1elasticsearch - (*****)엘라스틱서치 분석 이해하기 20160623
https://www.slideshare.net/dahlmoon/20160623 - (*****)엘라스틱서치 적합성 이해하기 20160630
https://www.slideshare.net/dahlmoon/20160630 - (***)elastic search 간단팁
http://sencha.tistory.com/entry/elastic-search-%EC%A0%95%EB%A6%AC?category=523595 - (*****)[XECon + PHPFest 2014] Session 3-2 : ElasticSearch를 이용한 통합검색 구축방법
https://www.youtube.com/watch?v=xGKlg7HzPSI - [Elasticsearch] 검색의 연관성 좀 더 높여보기
https://www.slideshare.net/hosangjeon10/ss-43108684
EMOCON 2015 F/W ELK 스택을 사용한 서울시 지하철 대시보드 만들기
https://www.youtube.com/watch?v=ec-XzM6_CgU&feature=youtu.be
2018년 3월 19일 월요일
Elasticsearch 로그검색시스템 팁
http://www.iblue.kr/xe/?mid=board_pwTp15&listStyle=list&document_srl=1793774
갠적으로 이런 깔끔한 스탈좋은
갠적으로 이런 깔끔한 스탈좋은
ElasticSearch 를 윈도우에 설치하고 테스트 할때,
참고 : https://stackoverflow.com/questions/48209323/content-type-header-application-x-www-form-urlencoded-is-not-supported
-텍스트일떄는
curl -XGET localhost:9200/ -H "Content-Type: application/json" -d "{\"query\": {\"simple_query_string\" : {\"fields\" : [\"content\"], \"query\" : \"foo bar -baz\"}}}"
-json 파일일때는
curl -XPOST localhost:9200/classes/class/1/ -H "Content-Type: application/json" -d @onclass.json
_bulk 집어넣을떄 kibana 에서 편하게
Dev Tools 에서
POST _bulk
{ "index" : { "_index" : "basketball", "_type" : "record", "_id" : "1" } }
{"team" : "Golden States Warriors","name" : "Stephen Curry", "points" : 30,"rebounds" : 3,"assists" : 4, "blocks" : 5, "submit_date" : "2016-10-11"}
{ "index" : { "_index" : "basketball", "_type" : "record", "_id" : "2" } }
....
2018년 3월 11일 일요일
2018년 3월 6일 화요일
ELK = Elasticsearch + Logstash + Kibana
0.먼저 이해
Logstash 로 서버 로그 수집프로그램. 여기서 수집한 정보는 Elasticsearch 에게 json 으로 쏜다.그걸 kibana 에서 쿼리로 그래픽분석하는 흐름
0-1. Logstash
-https://evilimp79.wordpress.com/2014/10/23/logstash-이해하기/
-http://asuraiv.blogspot.jp/2015/07/elasticsearch-logstash.html *설치와기본개념
test.conf 에 아래처럼입력하고 logstash -f test.conf 하면
input {
stdin{ }
}
filter {
}
output {
stdout {
codec => rubydebug { }
}
}
아래가 출력
desuk
{
"@timestamp" => 2018-03-06T07:48:31.450Z,
"@version" => "1",
"host" => "pc1.local",
"message" => "desuk"
}
Logstash 로 서버 로그 수집프로그램. 여기서 수집한 정보는 Elasticsearch 에게 json 으로 쏜다.그걸 kibana 에서 쿼리로 그래픽분석하는 흐름
0-1. Logstash
-https://evilimp79.wordpress.com/2014/10/23/logstash-이해하기/
-http://asuraiv.blogspot.jp/2015/07/elasticsearch-logstash.html *설치와기본개념
test.conf 에 아래처럼입력하고 logstash -f test.conf 하면
input {
stdin{ }
}
filter {
}
output {
stdout {
codec => rubydebug { }
}
}
아래가 출력
desuk
{
"@timestamp" => 2018-03-06T07:48:31.450Z,
"@version" => "1",
"host" => "pc1.local",
"message" => "desuk"
}