Ace-T's Blog 내 검색 [네이버 커넥트 이웃 합니다~^-^/ 요청 大 환영~~]

Curator를 사용해보자(인덱스 관리)

OpenSource/ElasticSearch 2015.12.16 15:24
[Good Comment!!, Good Discussion!!, Good Contens!!]
[ If you think that is useful, please click the finger on the bottom~^-^good~ ]
by ace-T

아래처럼..log가 점점 쌓아져간다~엘라스틱서치에서 인덱스가 늘어나고 있다는 뜻이다.



그래서 아래처럼 줄여보고자 한다. 어떻게?


Curator를 사용해보자!



Curator?
indices들을 관리해준다!

시작하기!


Curator Setting

더보기


Curator Upgrade
pip install -U elasticsearch-curator
Requirement already up-to-date: elasticsearch-curator in /usr/lib/python2.6/site-packages
Requirement already up-to-date: click>=3.3 in /usr/lib/python2.6/site-packages (from elasticsearch-curator)
Requirement already up-to-date: elasticsearch<2.1.0,>=1.8.0 in /usr/lib/python2.6/site-packages (from elasticsearch-curator)

Requirement already up-to-date: urllib3<2.0,>=1.8 in /usr/lib/python2.6/site-packages (from elasticsearch<2.1.0,>=1.8.0->elasticsearch-curator)


Curator --help

더보기


Curator Command

1) 색인 리스트 보기

curator --host 엘라스틱서치ip show indices --timestring '%Y.%m.%d'


2) 색인 삭제

curator --host 엘라스틱서치ip delete indices --older-than 30 --time-unit days --timestring '%Y.%m.%d' --time-unit days --prefix logstash
2015-12-15 13:59:15,246 INFO      Job starting: delete indices
2015-12-15 13:59:15,265 INFO      Pruning Kibana-related indices to prevent accidental deletion.
2015-12-15 13:59:15,265 INFO      Action delete will be performed on the following indices: [u'logstash-2015.09.02', u'logstash-2015.09.03', u'logstash-2015.09.04', u'logstash-2015.09.05', u'logstash-2015.09.06', u'logstash-2015.09.07', u'logstash-2015.09.08', u'logstash-2015.09.09', u'logstash-2015.09.10', u'logstash-2015.09.11', u'logstash-2015.09.12', u'logstash-2015.09.13', u'logstash-2015.09.14', u'logstash-2015.09.15', u'logstash-2015.09.16', u'logstash-2015.09.17', u'logstash-2015.09.18', u'logstash-2015.09.19', u'logstash-2015.09.20', u'logstash-2015.09.21', u'logstash-2015.09.22', u'logstash-2015.09.23', u'logstash-2015.09.24', u'logstash-2015.09.25', u'logstash-2015.09.26', u'logstash-2015.09.27', u'logstash-2015.09.28', u'logstash-2015.09.29', u'logstash-2015.09.30', u'logstash-2015.10.01', u'logstash-2015.10.02', u'logstash-2015.10.03', u'logstash-2015.10.04', u'logstash-2015.10.05', u'logstash-2015.10.06', u'logstash-2015.10.07', u'logstash-2015.10.08', u'logstash-2015.10.09', u'logstash-2015.10.10', u'logstash-2015.10.11', u'logstash-2015.10.12', u'logstash-2015.10.13', u'logstash-2015.10.14', u'logstash-2015.10.15', u'logstash-2015.10.16', u'logstash-2015.10.17', u'logstash-2015.10.18', u'logstash-2015.10.19', u'logstash-2015.10.20', u'logstash-2015.10.21', u'logstash-2015.10.22', u'logstash-2015.10.23', u'logstash-2015.10.24', u'logstash-2015.10.25', u'logstash-2015.10.26', u'logstash-2015.10.27', u'logstash-2015.10.28', u'logstash-2015.10.29', u'logstash-2015.10.30', u'logstash-2015.10.31', u'logstash-2015.11.01', u'logstash-2015.11.02', u'logstash-2015.11.03', u'logstash-2015.11.04', u'logstash-2015.11.05', u'logstash-2015.11.06', u'logstash-2015.11.07', u'logstash-2015.11.08', u'logstash-2015.11.09', u'logstash-2015.11.10', u'logstash-2015.11.11', u'logstash-2015.11.12', u'logstash-2015.11.13', u'logstash-2015.11.14', u'logstash-2015.11.15']
2015-12-15 13:59:15,268 INFO      Deleting indices as a batch operation:
2015-12-15 13:59:15,268 INFO      ---deleting index logstash-2015.09.02
2015-12-15 13:59:15,268 INFO      ---deleting index logstash-2015.09.03
2015-12-15 13:59:15,268 INFO      ---deleting index logstash-2015.09.04
2015-12-15 13:59:15,268 INFO      ---deleting index logstash-2015.09.05
2015-12-15 13:59:15,268 INFO      ---deleting index logstash-2015.09.06
2015-12-15 13:59:15,268 INFO      ---deleting index logstash-2015.09.07
2015-12-15 13:59:15,268 INFO      ---deleting index logstash-2015.09.08
2015-12-15 13:59:15,268 INFO      ---deleting index logstash-2015.09.09
2015-12-15 13:59:15,268 INFO      ---deleting index logstash-2015.09.10
2015-12-15 13:59:15,268 INFO      ---deleting index logstash-2015.09.11
2015-12-15 13:59:15,268 INFO      ---deleting index logstash-2015.09.12
2015-12-15 13:59:15,268 INFO      ---deleting index logstash-2015.09.13
2015-12-15 13:59:15,268 INFO      ---deleting index logstash-2015.09.14
2015-12-15 13:59:15,269 INFO      ---deleting index logstash-2015.09.15
2015-12-15 13:59:15,269 INFO      ---deleting index logstash-2015.09.16
2015-12-15 13:59:15,269 INFO      ---deleting index logstash-2015.09.17
2015-12-15 13:59:15,269 INFO      ---deleting index logstash-2015.09.18
2015-12-15 13:59:15,269 INFO      ---deleting index logstash-2015.09.19
2015-12-15 13:59:15,269 INFO      ---deleting index logstash-2015.09.20
2015-12-15 13:59:15,269 INFO      ---deleting index logstash-2015.09.21
2015-12-15 13:59:15,269 INFO      ---deleting index logstash-2015.09.22
2015-12-15 13:59:15,269 INFO      ---deleting index logstash-2015.09.23
2015-12-15 13:59:15,269 INFO      ---deleting index logstash-2015.09.24
2015-12-15 13:59:15,269 INFO      ---deleting index logstash-2015.09.25
2015-12-15 13:59:15,269 INFO      ---deleting index logstash-2015.09.26
2015-12-15 13:59:15,269 INFO      ---deleting index logstash-2015.09.27
2015-12-15 13:59:15,269 INFO      ---deleting index logstash-2015.09.28
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.09.29
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.09.30
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.10.01
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.10.02
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.10.03
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.10.04
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.10.05
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.10.06
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.10.07
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.10.08
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.10.09
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.10.10
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.10.11
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.10.12
2015-12-15 13:59:15,270 INFO      ---deleting index logstash-2015.10.13
2015-12-15 13:59:15,271 INFO      ---deleting index logstash-2015.10.14
2015-12-15 13:59:15,271 INFO      ---deleting index logstash-2015.10.15
2015-12-15 13:59:15,271 INFO      ---deleting index logstash-2015.10.16
2015-12-15 13:59:15,271 INFO      ---deleting index logstash-2015.10.17
2015-12-15 13:59:15,271 INFO      ---deleting index logstash-2015.10.18
2015-12-15 13:59:15,271 INFO      ---deleting index logstash-2015.10.19
2015-12-15 13:59:15,271 INFO      ---deleting index logstash-2015.10.20
2015-12-15 13:59:15,271 INFO      ---deleting index logstash-2015.10.21
2015-12-15 13:59:15,271 INFO      ---deleting index logstash-2015.10.22
2015-12-15 13:59:15,271 INFO      ---deleting index logstash-2015.10.23
2015-12-15 13:59:15,271 INFO      ---deleting index logstash-2015.10.24
2015-12-15 13:59:15,271 INFO      ---deleting index logstash-2015.10.25
2015-12-15 13:59:15,271 INFO      ---deleting index logstash-2015.10.26
2015-12-15 13:59:15,271 INFO      ---deleting index logstash-2015.10.27
2015-12-15 13:59:15,272 INFO      ---deleting index logstash-2015.10.28
2015-12-15 13:59:15,272 INFO      ---deleting index logstash-2015.10.29
2015-12-15 13:59:15,272 INFO      ---deleting index logstash-2015.10.30
2015-12-15 13:59:15,272 INFO      ---deleting index logstash-2015.10.31
2015-12-15 13:59:15,272 INFO      ---deleting index logstash-2015.11.01
2015-12-15 13:59:15,272 INFO      ---deleting index logstash-2015.11.02
2015-12-15 13:59:15,272 INFO      ---deleting index logstash-2015.11.03
2015-12-15 13:59:15,272 INFO      ---deleting index logstash-2015.11.04
2015-12-15 13:59:15,272 INFO      ---deleting index logstash-2015.11.05
2015-12-15 13:59:15,272 INFO      ---deleting index logstash-2015.11.06
2015-12-15 13:59:15,272 INFO      ---deleting index logstash-2015.11.07
2015-12-15 13:59:15,272 INFO      ---deleting index logstash-2015.11.08
2015-12-15 13:59:15,272 INFO      ---deleting index logstash-2015.11.09
2015-12-15 13:59:15,272 INFO      ---deleting index logstash-2015.11.10
2015-12-15 13:59:15,273 INFO      ---deleting index logstash-2015.11.11
2015-12-15 13:59:15,273 INFO      ---deleting index logstash-2015.11.12
2015-12-15 13:59:15,273 INFO      ---deleting index logstash-2015.11.13
2015-12-15 13:59:15,273 INFO      ---deleting index logstash-2015.11.14

2015-12-15 13:59:15,273 INFO      ---deleting index logstash-2015.11.15

   - 끝 -


저작자 표시 비영리 변경 금지
신고

acet 박태하가 추천하는 readtrend 추천글!

설정

트랙백

댓글

:::: facebook을 이용하시는 분들은 로그인 후 아래에 코멘트를 남겨주세요 ::::

티스토리 툴바