{"id":616,"date":"2016-10-05T13:10:34","date_gmt":"2016-10-05T04:10:34","guid":{"rendered":"http:\/\/www.nukoneko.info\/blog\/?p=616"},"modified":"2016-10-05T13:11:49","modified_gmt":"2016-10-05T04:11:49","slug":"centos7%e3%81%abcurator4%e3%82%92%e5%85%a5%e3%82%8c%e3%81%a6elasticsearch%e3%81%ae%e5%8f%a4%e3%81%84%e3%83%ad%e3%82%b0%e3%82%92%e6%b6%88%e3%81%97%e3%81%9f%e3%83%a1%e3%83%a2","status":"publish","type":"post","link":"https:\/\/www.nukoneko.info\/blog\/?p=616","title":{"rendered":"CentOS7\u306bCurator4\u3092\u5165\u308c\u3066Elasticsearch\u306e\u53e4\u3044\u30ed\u30b0\u3092\u6d88\u3057\u305f\u30e1\u30e2"},"content":{"rendered":"<p>Logstash\u306e\u30ed\u30b0\u304c\u6c17\u4ed8\u3044\u305f\u3089\u3081\u3061\u3083\u3093\u3053\u6e9c\u307e\u3063\u3066\u305f\u306e\u3067\u51e6\u7406\u3057\u305f\u3068\u304d\u306e\u30e1\u30e2<br \/>\n<!--more--><\/p>\n<p>curator \u3068\u3044\u3046\u306e\u304c\u6709\u308b\u3068\u77e5\u3063\u305f\u306e\u3067\u8abf\u3079\u3066\u305f\u3051\u3069\u30012.x 3.x \u306e\u8a18\u4e8b\u3070\u304b\u308a\u3060\u3063\u305f\u306e\u3067\u56f0\u3063\u3066\u305f\u3002<\/p>\n<h1>\u74b0\u5883<\/h1>\n<p>CentOS 7.2<\/p>\n<h1>curator \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<p>\u81ea\u5206\u306f yum \u3092\u4f7f\u3044\u305f\u304b\u3063\u305f\u306e\u3067\u3001\u516c\u5f0f\u3092\u53c2\u8003\u306b\u8a2d\u5b9a\u3057\u305f\u3002<br \/>\n<a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/client\/curator\/current\/installation.html\" target=\"_blank\">Curator 4.1 Instration<\/a><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# \/etc\/repo.d\/curator.repo \u3092\u4f5c\u6210 \u7de8\u96c6\r\n&#x5B;curator-4]\r\nname=CentOS\/RHEL 7 repository for Elasticsearch Curator 4.x packages\r\nbaseurl=http:\/\/packages.elastic.co\/curator\/4\/centos\/7\r\ngpgcheck=1\r\ngpgkey=http:\/\/packages.elastic.co\/GPG-KEY-elasticsearch\r\nenabled=1\r\n<\/pre>\n<p>\u3067\u3001 yum install<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo yum install python-elasticsearch-curator\r\n<\/pre>\n<h1>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210<\/h1>\n<p>\u3057\u305f\u3044\u3053\u3068<br \/>\n&#8211; localhost:9200 \u306eElasticsearch\u3078\u63a5\u7d9a<br \/>\n&#8211; logstash \u3067\u59cb\u307e\u308bindex\u3000\u306e\u524a\u9664<br \/>\n&#8211; \u904e\u53bb30\u65e5\u5206\u3060\u3051\u6b8b\u3059<\/p>\n<h2>config\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210<\/h2>\n<p>curator \u3092\u5b9f\u884c\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u306e ~\/.curator\/ \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b curator.yml \u3092\u4f5c\u6210<br \/>\n<strong>\u5225\u306e\u5834\u6240\u306b\u4f5c\u3063\u3066\u3082\u3001\u30d1\u30b9\u6307\u5b9a\u3067\u304d\u308b\u306e\u3067\u554f\u984c\u306a\u3044\u3002<\/strong><\/p>\n<p>\u516c\u5f0f\u3092\u53c2\u8003\u306b&#8230;<br \/>\n<a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/client\/curator\/current\/configfile.html\" target=\"_blank\">Curator4.1 Configuration<\/a><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# ~\/.curator\/curator.yml\r\nclient:\r\n  hosts:\r\n    - localhost # \u63a5\u7d9a\u5148IP \u304b\u30db\u30b9\u30c8\u540d\r\n  port: 9200\r\n  url_prefix:\r\n  use_ssl: False\r\n  certificate:\r\n  client_cert:\r\n  client_key:\r\n  ssl_no_validate: False\r\n  http_auth:\r\n  timeout: 30\r\n  master_only: False\r\n\r\nlogging:\r\n  loglevel: INFO\r\n  logfile:\r\n  logformat: default\r\n  blacklist: &#x5B;'elasticsearch', 'urllib3']\r\n<\/pre>\n<p>\u3082\u308d\u3082\u308d\u306e\u8a2d\u5b9a\u306f\u3053\u3061\u3089\u3067\u51fa\u6765\u307e\u3059\u3002\u3000\u7d50\u679c\u306e\u30ed\u30b0\u306e\u51fa\u529b\u3068\u304b..<\/p>\n<h2>action\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210<\/h2>\n<p>\u3084\u308a\u305f\u3044\u3053\u3068\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3000\u4eca\u56de\u306findex\u3092\u6d88\u3057\u305f\u3044<\/p>\n<p>\u5834\u6240\u306f\u3069\u3053\u3067\u3082\u3044\u3044\u3067\u3059\u3002\u3000\u79c1\u306f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3068\u540c\u3058\u5834\u6240\u306b\u7f6e\u304d\u307e\u3057\u305f<br \/>\n\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u9069\u5f53\u306b\u3001 delete_indices_30_days \u306b\u3057\u307e\u3057\u305f<\/p>\n<p>\u516c\u5f0f\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u53c2\u8003\u306b&#8230;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# ~\/.curator\/delete_indices_30_days\r\n# Remember, leave a key empty if there is no value.  None will be a string,\r\n# not a Python &quot;NoneType&quot;\r\n#\r\n# Also remember that all examples have 'disable_action' set to True.  If you\r\n# want to use this action as a template, be sure to set this to False after\r\n# copying it.\r\nactions:\r\n  1:\r\n    action: delete_indices\r\n    description: &gt;-\r\n      Delete indices older than 45 days (based on index name), for logstash-\r\n      prefixed indices. Ignore the error if the filter does not result in an\r\n      actionable list of indices (ignore_empty_list) and exit cleanly.\r\n    options:\r\n      ignore_empty_list: True\r\n      timeout_override:\r\n      continue_if_exception: False\r\n      disable_action: True\r\n    filters:\r\n    - filtertype: pattern\r\n      kind: prefix\r\n      value: logstash-\r\n      exclude:\r\n    - filtertype: age\r\n      source: name\r\n      direction: older\r\n      timestring: '%Y.%m.%d'\r\n      unit: days\r\n      unit_count: 45 #\u4f55\u65e5\u524d\u307e\u3067\u6b8b\u3059\u304b\r\n      exclude:\r\n<\/pre>\n<p>\u3053\u306e\u307e\u307e\u3060\u3068\u5b9f\u884c\u3067\u304d\u306a\u3044\u306e\u3067\u3001<br \/>\n&#8220;disable_action: True&#8221; \u3092 False \u306b\u3057\u307e\u3059\u3002<\/p>\n<h1>\u5b9f\u884c<\/h1>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092 ~\/.curator\/curator.yml \u306b\u4f5c\u3063\u305f\u5834\u5408\r\n$ curator ~\/.curator\/delete_indices_30_days\r\n\r\n# \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092 \u305d\u308c\u4ee5\u5916\u306e\u5834\u6240\u306b\u4f5c\u3063\u305f\u5834\u5408\r\n$ curator --config \/path\/to\/curatoy.yml  ~\/.curator\/delete_indices_30_days\r\n<\/pre>\n<p>\u3044\u3051\u307e\u3057\u305f\uff01 \u3067\u306f\u3067\u306f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Logstash\u306e\u30ed\u30b0\u304c\u6c17\u4ed8\u3044\u305f\u3089\u3081\u3061\u3083\u3093\u3053\u6e9c\u307e\u3063\u3066\u305f\u306e\u3067\u51e6\u7406\u3057\u305f\u3068\u304d\u306e\u30e1\u30e2<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48,45],"tags":[],"class_list":["post-616","post","type-post","status-publish","format-standard","hentry","category-elasticsearch","category-service"],"_links":{"self":[{"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=616"}],"version-history":[{"count":5,"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/616\/revisions"}],"predecessor-version":[{"id":621,"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/616\/revisions\/621"}],"wp:attachment":[{"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}