Category Archives: Elasticsearch

[Elasticsearch] The health status means…

When we list the indexes, we will get the status information. It shows the health of index in the elasticsearch cluster. green All shards are allocated. yellow The primary shard is allocated but replicas are not. red The specific shard … Continue reading

Posted in Elasticsearch | Leave a comment

[Elasticsearch] List all indexes and optimize it.

When we deleted the indexes, the data were just marked by deleted. We can list all indexes to show status.

It will show the health, index name, pri, rep, docs.count, docs.deleted, store.size, pri.store.size.

If we want to clear … Continue reading

Posted in Elasticsearch | Leave a comment

[Elasticsearch] Delete index by search syntax

check the search syntax

ex:

Delete index by search syntax

ex:

Posted in Elasticsearch | Leave a comment

[Apache] Proxypass

Because the default web port of Elasticsearch is 9200. And I want to change it with 80. Maybe I could use the proxypass function. enable the proxy, and restart apache

add following into the /etc/apache2/sites-enabled/000-default.conf

edit the kibana … Continue reading

Posted in Apache, Elasticsearch, Kibana | Leave a comment

淺談 Elasticsearch 的定義

[摘錄自Elasticsearch Server, 2nd Edition第12頁] The basics of Elasticsearch Elasticsearch is an open source search server project started by Shay Banon and published in February 2010. During this time, the project has grown into a major player in the field of … Continue reading

Posted in Elasticsearch | Leave a comment

elasticsearch.yml 檔案說明

說明此檔案包含多個設定的部份,可以至 Elasticsearch Guide 觀看說明

安裝相關的部份可參考 Elasticsearch 安裝說明

Elasticsearch預設會套用許多設定,所已可以不用更改設定就可先進行測試

預設情況下,絕大部分都能夠支應一個生產情況下的Cluster,假如想要試著調整設定,或是擔心更改設定會影響整各服務,可以寫信給開發團隊或是至 Elasticsearch 社群 詢問

任何設定檔的元素皆可以使用環境變數

針對設定檔內部所支援的格式可以參考 Elasticsearch 安裝設定說明

設定cluster的名稱,後續將使用multicast進行詢問server在哪裡,當server收到multicast後就會跟node進行聯繫

對本node進行命名

在此先對master node跟data node進行解釋 [摘錄自Elasticsearch Server, 2nd Edition第324頁] The master node is the one … Continue reading

Posted in Elasticsearch | Leave a comment

Logstash + Redis + Nginx + Kibana + ElasticSearch

環境: Ubuntu 14.04 x64 server 安裝Java環境

下載Logstash壓縮檔

基本測試

安裝Elasticsearch

設定Elasticsearch 編輯/etc/elasticsearch/elasticsearch.yml 取消cluster.name、node.name的注解並改成自己想要的 重新啟動Elasticsearch

安裝Redis

設定Redis 編輯/etc/redis/redis.conf,使用

重新啟動Redis

下載Kibana

編輯Kibana設定檔 編輯/var/www/kubana/config.js,使用

設定Logstash Server設定檔 編輯/etc/logstash/server.conf

測試Logstash能否以Server啟動

安裝Nginx

設定Nginx 編輯/etc/nginx/sites-enabled/default,使用 … Continue reading

Posted in Elasticsearch, Kibana, Logstash, Redis | Leave a comment