Elasticlover

Elasticlover

Elastic Stackに関する1週間分のネット情報をまとめるブログです。

今週のElastic News (2018/06/10~2018/06/16)

今週、Elasticについて新たにWEBで観測した情報をまとめます。

今週の注目情報

Elastic Stack 6.3.0 Released

6.3.0 is here. There are some releases that fix bugs. There are some releases that add features. There are some releases that do both, and make a fairly major change in how you are entitled to interact with the software...this is of the latter variety.

今週の注目は間違いなくこちらだと思います。Elastic Stack 6.3のリリースです!

まず、X-Packがオープンコード化しました。

また、配布パッケージにX-Packが同梱されるようになり、X-Pack Basicが有効になった状態がデフォルトになります。 もうインストール時にX-Packを追加インストールする必要はなく、Basicなら定期的なアカウント更新も必要ありません!驚異的な変更と言わざるを得ない...

しかも、KibanaにLicense Managementページが追加され、そこからX-Pack Platinumの試用ライセンス(30日間)を有効にすることができます。多分期間が過ぎたらBasicに戻るはず。

またしばらく『やってみた』記事が盛り上がりそうな雰囲気。ウォッチしていきます!




公式ブログ

RELEASES

Elasticsearch 6.3.0 Released

Today we are pleased to announce the release of Elasticsearch 6.3.0, based on Lucene 7.3.0. This is the latest stable release, and is already available for deployment via our Elasticsearch Service on Elastic Cloud.

いくつか気になった内容を示します。 (ほぼ全部!)

  • Elasticsearch SQL
    • Elasticsearchに対してSQLで問い合わせることができるようになる機能が遂に実装されました!
      • DBとしてのElasticsearchに最も望まれた機能であったことはこのツイートなどからも分かります
    • REST APIと "translate"機能はX-Pack Basic、
  • Rollup
    • X-Pack Basicの機能に追加
    • 取得したメトリックに対して一定期間経過したものは統計情報のみに変換して、生値を削除する機能が追加されました
    • これによりストレージ容量を気にかけることが少なくなりそうです
  • Java 10サポート
    • 6.2でJava 9をサポートしたのも記憶に新しいですが、6.3でJava10をサポートするようです
    • なお、Javaの短期リリースサイクルに慣れていない大多数のユーザはJava 8を引き続き使うよう勧めています



Elasticsearch 5.6.2 released

Today we are pleased to announce the release of Elasticsearch 5.6.10, based on Lucene 6.6.1. Elastisearch 5.6.10 is the latest stable release in 5.x, and is already available for deployment on Elastic Cloud, our Elasticsearch-as-a-service platform.

その横でしれっと5.xもバグフィックスがリリースされていました。




Kibana 6.3.0 is released

It's Kibana release time again, and in this release in addition to the changes related to opening of X-Pack, you will see a lot of small and medium features. But don't let their size fool you - these changes should have a large impact for the users.

主にElastic Stack管理系UIの更新と細かくも気が利く系の便利機能など。 いくつか気になった内容を示します。

  • Managementにライセンス管理画面を追加
  • クエリバーの自動補完
    • クエリバー右側のOptionsから有効化する必要あり
  • ホームページに最近閲覧したページへのリンクが表示されるように
  • タイムピッカーに最近使用した時間設定が表示されるように
    • 特にabsoluteとかで見てた場合にはかなり便利そう
  • Dashboardのグリッドがより細かくなった
  • インデックス管理画面の追加
    • Elasticsearch内のインデックスに関する情報を一覧できます
      • indexの削除が可能
      • mappingを確認可能
      • settingsを確認可能な上、画面上から更新も可能に
    • indexの設定を確認するのに、いちいちConsoleからAPIを叩く時代は終わりそうですね!
  • MonitoringのオンオフがKibanaのMonitoring画面からできるように
    • なお、デフォルトがオフになっているので注意が必要です



Logstash 6.3.0 Released

Today is a big day -- we're releasing the first version of Logstash since we've opened our X-Pack code. This is meaningful for a number of reasons which we've covered in detail in our opening X-Pack announcement. This release also brings a number of significant new features and performance improvements.

いくつか気になった内容を示します。

  • Persistent Queueの重大なバグフィックスを含むため、過去のPQは排除or削除したうえでアップデートする必要がある
  • Java実行エンジンのパフォーマンスを向上(ENGINEERINGの記事で後述)
  • S3とSQSプラグインのカスタムエンドポイントとリージョンのサポートを追加
  • Exec input plugin:'schedule'オプションを設定することで定期的実行できるようになった
  • Redis input plugin:SSL/TLSおよびUnixソケットの基本サポートを追加

これ以外にPipeline-to-Pipeline CommunicationというBeta機能が追加されていますが、私の現時点の理解力ではよくわかりませんでした…。




Beats 6.3.0 Released

We're pleased to release Beats 6.3.0. Enjoy! Here are the highlights: You probably got used to the fact that each 6.x minor release is making Kubernetes monitoring even nicer, so we couldn't disappoint you with this one.

いくつか気になった内容を示します。

  • k8s/Dockerアノテーションを通してBeatsを設定できるようになった
  • 全てのBeatsで投入イベントの永続化ができるようになった(ベータ版)
    • 発行されるイベントは最初にスプールに書き込まれ、その後でElasticsearchまたはLogstashに転送される
    • ディスクへのスプールはBeatsが再起動された後、またはネットワークの問題により出力が長時間停止した場合でも、引き続き利用できる
    • ベータ版のため、商用環境では使用しないこと
  • メタデータにホスト情報が追加されるようになった
    • クラウド上やk8sで実行しているときは各種メタデータを収集していたのに、オンプレでやってなかったのはおかしいよね?ということで追加された
    • Filebeatに以下の新モジュールを追加
      • MongoDB
      • Logstash
      • IIS
    • Metricbeatに以下の新モジュールを追加
      • Etcd
      • Graphite
      • Logstash
      • Munin



Elasticsearch for Apache Hadoop 6.3.0 Released

​I am excited to announce the release of Elasticsearch for Apache Hadoop (aka ES-Hadoop) 6.3.0 built against Elasticsearch 6.3.0. Spark 2.3 Support Starting in 6.3.0, we now support up to the most recent Spark 2.3 release. It should be noted that Spark 2.3 does not support Scala 2.10 any longer.




Elastic Cloud Enterprise 1.1.4 released

We are happy to announce the availability of ECE 1.1.4, a maintenance release. Please see the release notes here or head straight to our downloads page to get it! ECE 1.1.4 adds support for Elasticsearch and Kibana version 6.3.0. This version is required if you want to upgrade to these Stack versions.

  • Elastic Stack 6.3.0のサポート
  • 幾つかのセキュリティ脆弱性を修正



ENGINEERING

Meet the New Logstash Java Execution Engine

We're happy to announce that the new Java execution engine in Logstash has reached the production candidate stage. It features faster performance, reduced memory usage, and lower config startup and reload times. And you can use it now in Logstash 6.3.0 with the --experimental-java-execution flag!




Elastic Stack Updates

This Week in Elasticsearch and Apache Lucene - 2018-06-15

Rolling Upgrade to 6.3 Issue After the release of 6.3.0, we received reports of nodes not re-joining their cluster after a rolling upgrade for clients that both have a gold/platinum license installed, and security enabled. Workaround is to explicitly set xpack.security.enabled: true in the elasticsearch.yml file, we are adding to docs as a known issue.

ElasticsearchとLuceneに関する過去1週間のアップデートサマリ。 気になるのは…

  • 6.3のローリングアップデート時にある問題があり修正中
    • Gold / Platinumライセンスがインストールされ、セキュリティが有効になっているクライアントのローリングアップグレード後にクラスタに再結合しないノードがある問題
    • 回避策はelasticsearch.ymlのxpack.security.enabled: trueを明示的に設定すること



Qiita

Docker初心者が、Nginxのログを fluentd + elasticsearch + kibana で可視化してみた - Qiita

Dockerは仮想技術の一つ程度しか知らいない状態から、JJUG CCC 2018 Spring で「JavaエンジニアのためのDocker入門 ~ 仮想開発・テスト環境構築 ~ 」を聞いて少し勉強してみたのでDockerで環境を作ってみました。「 今更Docker入門 - コンテナ化することで何が嬉しいか」の延長線で、Nginxのログを fluentd + elasticsearch + ...

@zgmf_mbfp03さんによる記事です。

表題の内容を実現するdocker-composeを作成し、記事内で解説しています。




Dockerコンテナ上のElasticsearchのデータを永続化する - Qiita

5分でMacにDockerをインストールしてElasticsearchを起動する](https://qiita.com/matyahiko2831/items/dd64aa91f2b03e50f05d) の続編です。...

@matyahiko2831さんによる記事です。

Elasticsearchをdocker-composeで上げる際にvolumeを永続化しましょう、という話。




Elasticsearch 6.3.0 リリース記念 X-Pack SQL Accessをやってみよう - Qiita

Elasticsearchに検索条件を投げるとき、Elasticsearchのクエリを組み立てる必要がありました。 このクエリを(みんなが書き慣れてるだろう)SQLで書けないか、というような位置づけなんだろうと思いますが、 SQLをクエリとして発行したり、Elasticsearchのクエリに変換できる機能が6.3.0でX-Pack)に入りました。 それを試してみます。

@tsgkdtさんによる記事です。

(観測範囲では)本邦最速のElasitcsearch SQLを色々と試してみた系記事です!今後よく参照されそう。(少なくとも私は…)

結果が「あれ?」と思ったら「SQL Translate API」を使って実際のクエリ内容を見てみれば大丈夫ですよ~、とか実践的で、ありがたいです。JOINサポート、来てほしいですね。




書籍

Elasticsearch実践ガイド - インプレスブックス

データサイエンティスト必修のElasticsearch入門

日本ヒューレットパッカードの惣道 哲也さん著による「Elasticsearch実践ガイド」がインプレスさんから出版されました!

くしくもバージョン6.3がリリースされた直後に発売となり、古いバージョンについての本になってしまいましたが、Elasticsearchに対する基本的な考え方は変わらないと思います。

プロフェッショナルの立場から、必要な知識を隅から隅まで書かれた素晴らしい本です。また、全くElasticsearchを知らない人にも理解できるよう、背景や概念的な説明にも余念がありません。 (まだ全て読んでいませんが、読めば読むほど抜け落ちていた知識が補足されていって、有意義な読書時間を満喫しています。)

第1版のため、誤植もあったりするようですが、見つけたら「お問い合わせ - インプレスブックス」から報告しましょう!




その他ブログ記事など

日本語




Amazon Elasticsearch Service の Blue/Green デプロイについて調べてみた

Manabu Sakaiさんによる記事です。

Amazon Elasticsearch Serviceではクラスタドメイン)を変更した際にBlue/Greenデプロイが走るようで、その内容を詳しくまとめられています。

Blue/Green Deploymentとは何ぞや?という方はこちら




PythonからElasticsearchに_typeを明記せずにクエリを実行する(prefix指定)

Elasticsearch 5.3に対してPythonからアクセスする際、Indexはワイルドカード指定できるのだけど、Typeについてはワイルドカードでの指定ができない。 一応、カンマ区切りで複数の指定は可能なのだけど、あまりにTypeの数が多くなるとhttpのエラーでクエリを実行できなくなってしまう。で、なんかいい方法ないのかなと調べていたのだけど、どうやらクエリ側にprefixとして_typeを定義してやることで、ワイルドカードでの指定と同じようなことができるようだ。 query = { 'bool': { 'must':[ 'prefix': {'_type': {'value': } } ] }, ... } } この場合、クエリ実行時に_typeは指定しないようにする必要があるけど、ひとまずこれでワイルドカード指定と同じような挙動をしてくれた。

Blacknonさんによる記事です。

表題の通りのTips。また、今週は「PythonからElasticsearchのIndex/Typeの一覧を取得する」という記事も書かれています。




Elastic Stack 6.3がリリースされました - Taste of Tech Topics

こんにちは。 @ shin0higuchi です😊 昨日Elastic Stackの6.3がリリースされました。 前回のElastic{ON}から3ヶ月経ち、その中で紹介された機能が徐々に盛り込まれて来た形です。 6.3での変更点をざっくりまとめます。

Acroquest Technologyのshin higuchiさんによる記事です。

次のクラメソさんの記事と合わせて読んでおけば、ほぼリリースされたばかりのElastic Stack6.3の新機能が理解できるといっても過言ではないと思います。




Elasticsearch 6.3.0 の新機能を試してみた | Developers.IO

Elastic Stack の新しいマイナーバージョン 6.3.0 がリリースされました。 Elastic Stack 6.3.0 では Elastic{ON} 2018 で紹介された機能が多く含まれていました。今回は Elasticsearch 6.3.0 の新機能を中心に簡単に試してみました。

クラスメソッドの藤本 真司さんによる記事です。

Elasticsearch 6.3の新機能はどうやったら試せますか?系はこちらの記事を読めばカカッっと理解できます。流石のスピード感です。




英語




Monitoring Audit Logs with auditd and Auditbeat

In this post, we will configure rules to generate audit logs. First, we will use auditd to write logs to flat files. Then we'll use Auditbeat to ship those logs through the Elasticsearch API: either to a local cluster or to Sematext Logs (aka Logsene, our logging SaaS).

SematextのRadu Gheorgheさんによる記事です。

まず、Auditdについて解説し、その後でAuditbeatで置き換える方法を紹介しています。




Building Better Reports With a Data Pipeline

Learn about the data-driven, visualization tools and systems that helped make Duo's new authentication and deployment reports possible.

DuoのBryan Witherspoonさんによる記事です。

利用者の認証ログをMySQLからKafka+Elasticsearchの構成に変更することで高速化した事例を共有しています。




Powerful logging with Docker, Filebeat and Elasticsearch

To perform an efficient log analysis, the ELK stack is still a good choice, even with Docker. The ELK stack is composed of the following components: Logstash , a component to collect, transform and enrich log entries. Elasticsearch , a database and search engine that stores and indexes data (here: log entries) in a scalable way.

Bruno COSTEさんによる記事です。

Filebeatを使用してログ収集をする方法を紹介しています。Dockerコンテナ上でSpring Bootを使用している前提で話を展開しています。




Geo distance search queries with Elasticsearch to provide store locator experience

Using Geo Distance Search Queries with elasticsearch to provide store locator experience

T-MobileのRam Gopinathanさんによるスライドです。

顧客向けに近くのストア情報を表示できるようにするためElasticsearchを使ってるよ、という話。 また、いくつかGolangでのクエリ実例も載っています。




ElasticSearch - Import Data from CSV by using Python - Yuliang's Blog

Importing data to ElasticSearch from CSV file is a really common use case, in my last post, I have explained how to export data from ElasticSearch to CSV. Here, I would like to explain how to import data from CSV to ElasticSearch.

Yuliangさんによる記事です。

Pythoncsvを読み込んで、Elasticsearchに投入する方法を載せています。 前回のポストではElasticsearchのデータを読み込んでcsvに出力する方法も。




Combine Amazon Translate with Elasticsearch and Skedler to build a cost-efficient multi-lingual omnichannel customer care - Part 2 of 2 - Skedler

In the previous post, we presented a system architecture to translate text from multiple languages with AWS Translate, index this information in Elasticsearch 6.2.3 for fast search, visualize the data with Kibana, and automated sending of customized intelligence with Skedler Reports and Alerts.

GuidanzのMatteo Zucconsさんによる記事です。

このポスト単体では「?」となるので、前のポストで概要を理解したうえで読むことをお勧めします。

API Gateway=>Lambda(Amazon Translateを実行)経由で顧客からの問い合わせを翻訳したうえでElasticsearchに投入し、Kibanaで可視化する方法を紹介しています。

また、データのアラートおよびレポートは同社が提供するskedlerを使いましょう!というストーリー。

元言語と英語の両方で検索できたりするのは便利っぽい。




Docker, Elasticsearch and Rails tutorial - Diego Y Kurisaki - Medium

Install Elasticsearch gems! Well this is no news but I had some trouble setting up my existing Rails application with elasticsearch so I hope this tutorial helps someone to not fall in the same pitfalls that I had. Gems https://github.com/elastic/elasticsearch-rails Elasticsearch gems are modularized, it depends how you choose to implement the integration in your application.

Diego Y Kurisakiさんによる記事です。

Ruby on Rails製のアプリからElasticsearchを叩く方法を紹介しています。 (Railsアプリをdocker-composeで上げていることを前提にしていますが、そうでなくても内容は変わらないと思います。)




Python implementation of Scroll API : Elasticsearch

Juggernautpandaさんによる記事です。

Python ClientでScroll APIを叩く際の実例を載せています。




How To Build A Movie Search App With React and ElasticSearch

In this post, we will use React and Elasticsearch to build a MovieSearch app. I know you like React, and watching movies, but what is this Elasticsearch thing I'm talking about. Don't worry. This blog post will give you a kickstart into understanding the basics of Elasticsearch - What is it?

Raj Meghparaさんによる記事です。

ReactivesearchというReactのUIコンポーネントを使用して、Elasticsearchと連携したReactアプリを作成する方法を紹介しています。 見出し画像のような検索画面が簡単に実現できてしまうのはすごいですね! デモサイトもあるようなので、まずはアクセスして手触り感を味わってみることをお勧めします。

また、その前のポストではReactとElasticsearchでAirbnbクローンを作るにはどうやればできるか?という内容の記事を書かれていて興味深いです。こちらではReactivesearchに加えてReactiveMapsを使って地図表示と絡めたアプリを作成しています。




英語以外

严选 | Elasticsearch史上最全最常用工具清单

铭毅天下さんによる記事です。

Elastic Stackの有用であったり、よく使われているプラグインが用途別にまとめられています。

知らないものも多く、こういうまとめが欲しかった!という感じです。すごい。(語彙力を失う)




Search Guard - Compliance Edition

Nous sommes très fiers de vous annoncer Search Guard™ Compliance Edition ! Des fonctionnalités additionnelles à "Search Guard Enterprise Edition", qui

EXCELERATE SystemsのAadel Benyoussefさんによる記事です。

Search GuardのCompliance Edition発表に合わせて搭載機能の紹介をしています。

Search Guardはポリシーベースでインデックスやフィールドを見せる/見せないをKibana/Elasticsearchに搭載できるユーザ管理プラグインです。OSS版もあり、X-Pack Securityを使えない場合の選択肢に上がるかもしれません。

日本語情報ではQiitaの@S-Tさんによるkibana(ELK)でユーザーやグループ毎に見せる/見せないをコントロールする。が詳しいです。




先週の漏れ

Change Is Good: The 5 Reasons Code.gov Moved from Lunr to Elasticsearch

Change can really bother people. Understandable as it can be a little scary. You get used to how things work, be it in life, at the day job, at home, or even on a website. When well thought out, however, change can benefit you, and we at Code.gov are always looking to make your experience with us and the website overall more efficient.

Code.govメンバによる記事です。

Code.govの検索エンジンをLunrからElasticsearchに変更した理由を述べています。

Code.govは、連邦政府機関のオープンソースプロジェクトをまとめたウェブサイトで、詳細はInsight for Dさんの記事が詳しいです。

また、LunrはSolrライクなnode.jsで書かれた軽量な検索パッケージです。

記事の中では以下の5点を理由として挙げています。

  1. より堅牢なインデックス作成機能と検索機能が提供できる
  2. 読み込み時間が短縮される
  3. より堅牢な検索言語が使用できる
    • 検索キーワードに関連する類義語検索もできるし、ステミングもできる
  4. サードパーティアプリから我々の検索APIを呼び出せるようになる
  5. 最近の検索クエリを数日間保管し、比較できる
    • これを材料として検索機能を日々改善していくことができる



Natural Language Extractions using Machine Learning in ElasticSearch

Introduction ElasticSearch is well-known for providing developers the flexibility to do common natural language tasks. Out of the box, these tasks

Apache OpenNLPを使用して自然言語抽出(構文解析)をしてくれるOpenNLP Ingest Processorプラグインの紹介。

OpenNLPのNLPNatural Language Processing。




Monitoring AWS Redshift With Elasticsearch - Anchormen | Data activators

AnchormenのSaman Sattari Khavasさんによる記事です。

「どのユーザーがAWS RedShift上でどのクエリを実行しているのか、これらのクエリのどれがシステムに大きな負荷をかけているのか」 を明確にするため、AWS Redshiftに対するCloudwatchデータをElasticsearchに投入する方法を紹介しています。

また、Cloudwatchデータだけでなく、Logstashのjdbc input pluginで、Redshift内のシステムテーブル情報を取得する方法も載せています。実践的。




今週は以上です。

など、かなり濃い一週間でした。

Have a Elastic day!