Elasticlover

Elasticlover

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

今週のElastic News (2018/07/15~2018/07/21)

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

今週の注目情報

今週はCraig Johnstonさんによる、k8s上で可用性の高いElasticsearch+Kibana環境を構築する一連のポストが非常に有用だと感じました。

他にk8s上にElasticsearchクラスタを構築するリファレンスとしてはpires/kubernetes-elasticsearch-clusterなどがある模様。

Production Grade Elasticsearch on Kubernetes

Installing production ready, Elasticsearch 6.2 on Kubernetes requires a hand full of simple configurations. The following guide is a high-level overview of an installation process using Elastic's recommendations for best practices. The Github project kubernetes-elasticsearch-cluster is used for the Elastic Docker container and built to operate Elasticsearch with nodes dedicated as Master, Data, and Client/Ingest.

  • Craig Johnstonさんによる記事です
    • 以下のステップに則ってk8sでElasticsearchクラスタを構成する手順を紹介しています
      1. 名前空間を作成
      2. アクセスとセキュリティ用にRBAC認証を設定
      3. Master/Data/Ingestそれぞれのノード用サービスを設定
      4. Dataノードを管理するStatefulSetを設定
      5. MasterノードのDeploymentを設定
      6. ClientノードとIngestノードのDeploymentを設定
      7. 動作確認



Kibana on Kubernetes

This guide walks through a process for setting up Kibana within a namespace on a Kubernetes cluster. If you followed along with Production Grade Elasticsearch on Kubernetes then aside from personal or corporate preferences, little modifications are necessary for the configurations below.

  • 引き続き、Craig Johnstonさんによる記事です
    • 以下のステップに則ってk8s上に認証機能付き+HTTPS通信のKibanaをデプロイする方法を紹介しています
      1. 名前空間を作成
      2. サービスを設定
      3. kibana.ymlのConfigMap作成
      4. Deploymentの設定
      5. Basic認証設定(任意)
      6. TLS証明書設定(任意)
      7. Ingress設定
    • 先の記事と合わせることでElasticsearch+Kibanaの環境をk8s上に構築できます



High Traffic JSON Data into Elasticsearch on Kubernetes

IOT devices, Point-of-Sale systems, application events or any client that sends data destined for indexing in Elasticsearch often need to send and forget, however, unless that data is of low value there needs to be assurance that arrives at its final destination. Back-pressure and database outages can pose a considerable threat to data integrity.

  • 引き続き引き続き、Craig Johnstonさんによる記事です
    • k8s上のElasticsearchへ高トラフィックJSONデータが送られてくる場合を想定し、rxtxとrtbeatを使用して可用性を高める案を紹介しています



公式ブログ

ENGINEERING

Integrating Nagios Checks with Logstash

Nagios is an open-source monitoring platform wherein users can write plugins or download a wide range of community plugins to accomplish highly customized monitoring goals. A while back, I wrote about how you can integrate any Nagios plugin into the Elastic Stack by using a plugin for Beats called NagioscheckBeat.




SAML based Single Sign-On with Elasticsearch and Azure Active Directory

With the release of the SAML realm within X-Pack security feature of Elasticsearch 6.2, implementing Single Sign-On (SSO) with a SAML 2.0 compliant identity provider is now just a simple case of configuration. We've written previously about how to enable SAML authentication in Kibana and Elasticsearch.




An Introduction to Elasticsearch SQL with Practical Examples - Part 1

The version 6.3 release of the Elastic Stack represented one of the most feature rich releases in recent memory. If the opening of X-Pack and addition of rollups weren't enough to get you excited, we announced the addition of SQL support as a experimental feature.

  • Dale McDiarmidさんによる記事です
    • Elasticsearch SQLの使い方について幾つものクエリ例を記載して紹介しています
    • demo.elastic.co で試してください、と何度も繰り返されているように、自分で環境とデータを用意する必要なく、クエリを試すことができるようになっています(なんと親切な!)



An Introduction to Elasticsearch SQL with Practical Examples - Part 2

In Part 1 of this Introduction to Elasticsearch SQL series, we provided a gentle introduction to the new Elasticsearch SQL feature as well as the _translate API. This specific post continues the series by exploring more complex features. After that, we'll look at some of the current limitations a user is likely to encounter with this initial release of SQL.

  • 引き続き、Dale McDiarmidさんによる記事です
    • パート2では、パート1よりも応用的なクエリについての紹介と、現時点で通常のSQLと比較し制限されていることは何であるか、そして将来的なアップデートで何をできるようにしていくか、を紹介しています
    • (パート1とパート2を実践すれば、現時点のElasticsearch SQLについてはほぼ理解できた、といっても過言ではないのでは…という良記事です!)



Elastic Stack Updates

Brewing in Beats: Load Auditbeat rules from a configuration directory

Welcome to Brewing in Beats! With these weekly series, we're keeping you up to date with what's new in Beats, including the latest commits and releases. Did you know that Beats 6.3 is already available? Try it and let us know what you think. Auditbeat is getting support for loading audit rules from /etc/auditbeat/audit.rules.d/*.conf.




Logstash Lines: Towards supporting NFS

Welcome to Logstash Lines! With these weekly series, we're keeping you up to date with what's new in Logstash, including the latest commits and releases. Did you know that Logstash 6.3 is already available? Try it and let us know what you think.

  • Monica Sarbuさんによる記事です
    • 最近のLogstashのアップデートサマリ
      • logstash-input-fileプラグインNFSなどリモートマウントされているファイルのサポートを追加した



This Week in Elasticsearch and Apache Lucene - 2018-07-20

Field aliases We have merged a new field aliases feature which allows users to specify a new alias field type. This new field type points has a property, "path", which points to a different field and will resolve to that field whenever it is used in search and aggregations.




公式ウェビナー

Integrating Data Stores with Elasticsearch | Elastic

Join Nathan Zamecnik, Senior Elastic Education Manager, for an overview of extracting data from a database, transforming and enriching it, and loading it into Elasticsearch. Content for this webinar is taken in part from Elastic's recently launched training specialization courses.

  • Nathan Zamecnikさんによるウェビナーです
    • 以下の章立てでブログの検索機能としてElasticsearchを使用する場合、RDBMSなどのData StoreとElasticsearchを統合する方法を紹介しています
      1. (2:55~)Elasticsearch and Databases
      2. (13:00~)Data Modeling
      3. (28:02~)Synchronizing DBs with Elasticsearch
      4. (39:23~)その他宣伝とQ&A
    • Elasticsearch Certified Engineerになった後の(!?)新しいコースとして幾つかのSpecialization Traningを作成中
      • Logging
      • Search
      • Security Analytics
      • Data Science
      • Metrics/APM...
    • その中のSearch Specializationコース全4章のうち、最初の3章の内容をこのウェビナーで紹介する
      • なお、デモ部分はオミットしてあるため、その部分が気になる人はSpecializationコースを受講してほしい、とのこと



Qiita

子供を守る、SquidguardとELKスタックで作るネットフィルタリングシステム - Qiita

背景 近頃の子供たちは、小学生のうちからタブレットやスマフォに慣れ親しんでいて、その活用の仕方も大人顔負けのようです。習い事に電車で通う子供たちは必ずと言っていいほどスマフォを携帯していて、乗り換え案内や待ち時間の暇つぶしにスマフ...

  • @tkeneixさんによる記事です
    • SquidguardとElastic Stackを組み合わせたdocker-composeパッケージ「docker-squidguard-elk」を紹介しています



ElasticsearchのDynamicTemplateのメモ - Qiita

Elasticsearchを使う機会があって、 DynamicTemplateを使用したので、そのときのメモです。 メモなので雑です。 DynamicTemplateは、elasticsearchにデータをアップロードする際、 el...

  • @yutako0217さんによる記事です
    • ElasticsearchのDynamicTemplateについて、どういうもので、どう使えばよいのか紹介しています



elasticsearch-rest-high-level-client の dependency を pom.xml に書くときの注意 - Qiita

java プログラムからElasticsearcのREST API を呼び出すために、 公式サイトの説明のとおり、pom.xml に以下の記述を追加しました。 org.el...

  • @windturtleさんによる記事です
    • Mavenのpom.xmlにおける依存関係の記述でelasticsearch-rest-high-level-clientのverを指定するだけではなく、elasticsearchのverも明示的に指定する必要があることを紹介しています



ICPでIngress Controllerのアクセスログを有効にする - Qiita

IBM Cloud PrivateでIngressアクセスログを有効にするメモ。 以下を参考にする。 [Configuring Ingress Controller on IBM Cloud Private](https://d...

  • @sotoiwaさんによる記事です
    • IBM Cloud PrivateでIngress Controllerのアクセスログを有効にし、LogstashでIngressのログだけを別ファイルとして出力する方法を紹介しています



ElasticSearch+Logstash+Kibanaで作るTwitter分析ダッシュボード 作成手順まとめ - Qiita

はじめに 今回はElasticSearchとKibanaを使った、Twitterダッシュボードの作成方法についての解説しています。ElasticSearchに関する前提知識はなくても、最後までたどり着ける構成になっている(はず?...

  • @koyamauchiさんによる記事です



その他ブログ記事など

日本語

アクセスログ収集用Elasticsearchの運用話 - astamuse Lab

こんにちは。インフラ・開発部のtorigakiです。 早いもので2回目の投稿となります。 弊社はアクセスログの収集・解析にElasticsearchを使用しているのですが、今回はこのElasticsearchの運用環境について書きたいと思います。

  • astamuseのtorigakiさんによる記事です
    • アクセスログ収集用に使われているElasticsearchについて以下のような運用にまつわる話を紹介しています
      • システム構成
      • Nginxによるアクセスバランシング
      • cronによる定期実行内容
      • 環境を移設する際に必要だった作業内容



EC2 上の Kibana にも認証機能を追加する | Developers.IO

2018年4月に Amazon Elasticsearch Service の Kibana に Cognito を使って認証機能を付与できるようになりました。 Amazon Elasticsearch Service の Kibana にログイン機能を追加できるようになりました 私が今関わっているプロダクトは Amazon Elasticsearch Service では要件が合わず、EC2 上で Elasticsearch クラスタを構築しています。基本的には全文検索用途なのですが、Console による API 発行だったり、データビューアとしてだったり、X-Pack のモニタリングだったり Kibana を利用しています。ただお客様情報も入っているため、セキュリティグループによる IPアドレス制御だけではセキュリティとしては物足りません。 そこで ALB の認証機能を使って、Kibana on EC2 に認証を追加しました。

  • クラスメソッドの藤本 真司さんによる記事です
    • ALBとCognito User Poolを組み合わせてEC2上のKibanaに認証を追加する方法を紹介しています



Elasticsearchで多言語検索対応してみた話.pdf

  • MedPeerの佐藤 元紀さんによるスライドです
    • ElasticsearchのSynonym Token Filter+専用辞書を活用して、海外医学文献情報のDBであるPubMedから英文ドキュメントの日本語検索を実現する方法を紹介しています



自宅でKibanaを最大限に活用してみる #1 - tshohe's memo

自宅でのElastic Stack活用事例その1 ルータのsyslog可視化 我が家のBaffalo製ルータ(WSR-2533DHP)だとsyslogを他ホストに転送できます。 詳細設定 > 管理 > ログ ...

  • id:tshoheさんによる記事です
    • 自宅でKibanaを活用できる案としてルータのsyslogをElasticsearchに転送し、可視化する案を紹介しています



GoogleのCloud LauncherがGCP Marketplaceと改名、コンテナアプリケーションのデプロイもサポート | TechCrunch Japan

Cloud ...

  • Frederic Lardinoisさんによる記事の日本語訳です
    • GoogleのCloud LancherがGCP Marketplaceと改名し、コンテナアプリケーションのデプロイが数クリックで可能になりました
      • その中にはもちろんElasticsearchも含まれています
      • また、将来的にGooglek8s engineだけではなく他のk8sへのデプロイもサポートする予定とのこと(?)



初心者のためのElasticsearchその1 | Developers.IO

Developers.IOは、AWSiOS/Androidアプリ、ビッグデータ、Alexa等の最新技術情報からリモートワークや働き方に関する記事まで多彩なトピックを紹介するクラスメソッドのオウンドメディアです。

  • クラスメソッドの中村 修太さんによる記事です
    • まだElasticsearchを使用したことのない初心者の方に向けてドキュメントの作成、検索、削除のAPI実行方法を紹介しています



英語

Securing AWS Elasticsearch Service by enabling Cognito Authentication

In this blog, we are discussing on enabling the Authentication for Elasticsearch / Kibana. Recently, AWS announced the Cognito Authentication support for Elasticsearch (link in the References section below). We have implemented the same thing in our scenario too. This article will cover how one can access the Kibana endpoint and elasticsearch endpoint securely which exists in private subnet.

  • Priyanka Sharmaさんによる記事です
    • AWS Elasticsearch ServiceにCognito認証を追加する方法を紹介しています
      • (オリジナルサービスロゴを載せた認証ページを簡単に作れるのは良いですね)
    • また、Cognito認証を有効にしたAmazon ESにcurlを実行するのにaws-es-curlの使用を薦めています



Put your Drupal Search on Steroids with Elasticsearch | Opensense Labs

Modern applications are expected to be equipped with powerful search engines. Drupal provides a core search module that is capable of doing a basic keyword search by querying the database. When it comes to storing and retrieving data, databases are very efficient and reliable. They can be also used for basic filtering and aggregating of data.

  • Ramanさんによる記事です
    • Drupalの検索機能をElasticsearchで置き換える方法を紹介しています



Marco Lancini

Have you ever been in a network penetration test where the scope is so huge you end up with dozens of files containing Nmap scan results, each of which, in turn, contains a multitude of hosts? If the answer is yes, you might be interested in this blog post.

  • Marco Lanciniさんによる記事です
    • Logstashでnmapデータを読み取り、Elasticsearchに投入する方法を紹介しています
    • また、Kibanaのvisualization/dashboard例をdashboard.jsonとしてアップロードしています



Netcool To Elasticsearch Use Case 1: Security Orchestration of Suspicious Activity Using VirtuOps Pilot | Automate IT Processes and Incident Response

We recently published an article about how you can send Netcool Events to Elasticsearch using VirtuOps®. Now the obvious question: other than having another historical database, what do I with this integration? This article will be the first in a series of posts that describe why putting your monitoring data into Elasticsearch and leveraging VirtuOps® Pilot orchestration and automation is a value add for any business.

  • VirtuOpsのChristopher Schaftさんによる記事です
    • 同社製のVirtuOps Pilotを使用してNetcoolからElasticsearchに投入されるイベントを活用したセキュリティオーケストレーションを実現する方法を紹介しています
    • (実際にワークフローが解説されていますが、Packetbeatなども活用されていて面白いです)



Optimizing Elasticsearch - How many shards per index?

Avoid performance problems by getting your shard allocation right. When Elasticsearch users create an index, the most important question they have is, "How many shards should I use?" In this video, we'll teach you how to optimize your sharding strategy. You'll also learn how design and performance are impacted by the number of shards you use.




EvtxToElk: A Python Module to Load Windows Event Logs into ElasticSearch

  • DRAGOSのDan Gunter & Marc Seitzさんによる記事です
    • 最近の脅威捜索では以下のような環境でなされることが多い
      • インターネット帯域幅が限られた環境
      • データ用に承認されたハードウェアリソース用のラップトップを使う
      • 提供されるデータセットは".evtx"ファイルとして格納された5~6GBのWindowsイベントログ
    • このような環境でも活用できる".evtx"ファイルからWindowsのイベントログをElasticsearchに投入するPythonモジュール、EvtxToElkを紹介しています
      • (Winlogbeatでいいんじゃないの?と思われる方もいらっしゃると思いますが、".evtx"ファイルからWindowsイベントログを取得することは2017/05/17次点ではWinlogbeatでは実現できないことがDiscussの発言から分かります)



Ingesting Log Files into ElasticSearch Using StreamSets Data Collector

This video shows you how use StreamSets Data Collector to ingest log files into ElasticSearch and visualize the data in Kibana.




英語以外

Uczymy się Elasticsearch #006: trafność - Programista Na Swoim

W poprzednim wpisie kilkukrotnie wspominałem o czymś takim jak trafność otrzymanych rezultatów. Nie wyjaśniłem wtedy zbyt wiele, bo temat zasługuje na poruszenie go w odrębnym artykule. I oto jest. Postaram się teraz wyjaśnić o co w tym wszystkim chodzi. Pamiętaj proszę, że tworząc ten wpis testowałem wszystko na Elasticsearchu w wersji 6.3 (najnowsza jaka w tamtym momencie była dostępna).

  • Piotr Prądzyńskiさんによる記事です。(ポーランド語)
    • この記事は"Uczymy się Elasticsearch"と題したElasticsearchについて解説するシリーズの第6回です
    • 今回は_score計算の特性について解説しています



ElasticSearch: Connaître et comprendre les bases - Le blog de la Gagie

Reading Time: 4 minutes Elasticsearch est un moteur de recherche et d'analyse distribué open-source, RESTful, distribué sur Apache Lucene. Depuis la sortie de la première version d'Elasticsearch en 2010, il est rapidement devenu le moteur de recherche le plus populaire. Il est couramment utilisé pour l'analyse des journaux, la recherche en texte intégral et les cas d'utilisation de l'intelligence opérationnelle.

  • Jean-Vincent Kassiさんによる記事です(フランス語)
    • Elasticsearchについて5つの利点、4つのユースケースを概説しています



[ELK] Tìm hiểu dịch vụ Logstash trong hệ thống ELK Stack Logging - Technology Diver

Tìm hiểu dịch vụ Logstash trong hệ thống ELK Stack Logging - Cuongquach.com | Ở bài viết này chúng ta sẽ không đi chi tiết về cách cài đặt Logstash và cách cấu hình xử lý các event log được nhận từ các nguồn log gửi tới.

  • Quách Chí Cườngさんによる記事です
    • Logstashの操作と構造の概要を説明しています



先週の漏れ

Leveraging Elasticsearch and Fuzzy String Matching to Find Duplicated Data

Like any data management software, VTS is only helpful to our users as long as the data within our system is reliable and accurate. But also like any data management system, we are not immune to human error. As new deals and leases are input each day, mistakes are made that can impact data integrity.

  • View The SpaceのElaina Polsonさんによる記事です
    • Elasticsearchのanalyzerにおけるstopwords、検索時に指定するfuzzinessパラメータ、prefixの指定を駆使して、重複データの検索を実現する方法を紹介します
      • 例:StarbuksとStarbuks Corporationが両方とも引っかかるようにする。更に可能であればStarbuxというtypoで検索しても引っかかるようにしたい



Kibana Single Sign-On with OpenID and Keycloak | Search Guard

Search Guard supports OpenID so you can seamlessly connect your Elasticsearch cluster with Identity Providers like Keycloak, Auth0 or Okta. To set up OpenID support, you just need to point Search Guard to the metadata endpoint of your provider, and all relevant configuration information is imported automatically.

  • Search GuardのJochen Kressinさんによる記事です
    • Search GuardとKeycloakを用いてOpenIDによるKibanaのシングルサインオン認証を実現する方法を紹介しています
    • (Search GuardのOpenID接続機能はEnterprise版以上でないと使えないため、有償機能の話となります)



今週は以上です。

"WHY SO ELASTIC?"