ãã£ãã
fluentd
ã§éãããã°ã GUI ã§ç°¡åã«è¦ããã¨ãåºæ¥ãªããã¨æ©ãã§ãããã以ä¸ã®åèã«ãããµã¤ãã®ããã«è¯ãäºä¾ãããã§ã¯ãªãã§ããã¨ãããã¨ã§æ©éãã£ã¬ã³ã¸ã
åèã«ãããµã¤ã
- Kibanaã£ã¦ãªãããï¼ï¼Kibana+elasticsearch+fluentdã§ãã°è§£æï¼
- Kibana + ElasticSearch + Fluentd ã試ãã¦ã¿ã
- Elasticsearchå ¥é pyfes 201207
- http://blog.johtani.info/blog/2013/06/10/fluent-es-kibana/
- Kibana Installation
- rashidkpc/Kibana
ããã¡ã
èªåãªãã«æ´çãã Elasticsearch
㨠kibana
ã«ã¤ãã¦ã
Elasticsearch
- Apache Lucene ããã¼ã¹ã«ä½ããã RESTful ãªæ¤ç´¢ã¨ã³ã¸ã³
- JSON ã§è¨å®ãæ¤ç´¢ãå¯è½
- ã¹ãã¼ãã¬ã¹ãªã®ã§ãã¼ã¿ãã¸ã£ã³ã¸ã£ã³æ¾ãè¾¼ããï¼ï¼ï¼
kibana
- Elasticsearch ã®ããã³ãã¨ã³ãã¨ãã¦åä½ãã
- ãã°ãæ¤ç´¢ããããã¬ã³ããã°ã©ãåãã Web ã¢ããªã±ã¼ã·ã§ã³ï¼ä»¥ä¸ã¯ã¹ã¯ãªã¼ã³ã·ã§ããï¼
è¨å®
ç°å¢
- Debian 6.0.7
- æ¢ã«
td-agent
ãã¤ã³ã¹ãã¼ã«æ¸ã¿ï¼fluentd 0.10.38ï¼ - æ¢ã«
Apache
ãã¤ã³ã¹ãã¼ã«æ¸ã¿
æºå
openjdk-6-jdk ã®ã¤ã³ã¹ãã¼ã«
ElasticSearch
ããããªãã¤ã³ã¹ãã¼ã«ãããã¨ããã¨ããã
Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME invoke-rc.d: initscript elasticsearch, action "start" failed.
Java
ã®å®è¡ç°å¢ãè¦ã¤ãããªãã¨æããã¦ãã¾ã£ãã®ã§ openjdk-6-jdk
ãã¤ã³ã¹ãã¼ã«ããã
sudo apt-get install openjdk-6-jdk
bundler ã®ã¤ã³ã¹ãã¼ã«
kibana
ã®ã»ããã¢ããã«ã¯ bundler
ãå¿
è¦ãªã®ã§ããã¤ãã¤ã³ã¹ãã¼ã«ãã¦ããã
sudo gem install bundler --no-ri --no-rdoc -V
ElasticSearch ã®è¨å®
ã¤ã³ã¹ãã¼ã«
deb
ããã±ã¼ã¸ãããã®ã§ãã¡ããå©ç¨ããã¦é ãã
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.3.deb sudo dpkg -i elasticsearch-0.90.3.deb
ã¡ãã£ã¨å°ã£ã
ElasticSearch
ã® init
ã¹ã¯ãªããã§ä½¿ããã¦ãã start-stop-daemon
ã®ãªãã·ã§ã³ã®ä¸é¨ã Debian 6.0.7
ã§ã¯é対å¿ãããã以ä¸ã®ãããªã¨ã©ã¼ãåã㦠ElasticSearch
ãèµ·åããªãã
Starting ElasticSearch Server:start-stop-daemon: unrecognized option '--status' Try 'start-stop-daemon --help' for more information. start-stop-daemon: unrecognized option '--status' Try 'start-stop-daemon --help' for more information. failed!
ä»æ¹ãªãã®ã§ä»¥ä¸ã®ããã«ä¿®æ£ãã¦èµ·ååºæ¥ãããã«ãããã¡ãªã¿ã« Debian 7
ã Ubuntu 13.04
ã§ä½¿ããã¦ãã start-stop-daemon
ã§ã¯ --status
ãªãã·ã§ã³ããµãã¼ãããã¦ããã®ã§ãã®å¯¾å¿ã¯ä¸è¦ã
kibana ã®è¨å®
kibana ã¦ã¼ã¶ã¼ãä½æ
root
ã¦ã¼ã¶ã¼ã§è²ã
ã¨ããã®ãå«ãªã®ã§ kibana
ãåä½ãããã¦ã¼ã¶ã¼ãä½ãã
adduser kibana
ä¸å¿ãsudo
権éãä¸ãã¦ãããï¼å¾ããåé¤ãã¦ãè¯ããã¨ãï¼
git clone
ãã¡ããåèã«ã㦠kibana
ã®ãªãã¸ããªã clone ãã¦ããã
sudo su - kibana git clone --branch=kibana-ruby https://github.com/rashidkpc/Kibana.git
bundle install
bundle install
ãå®è¡ããã
sudo bundle install
æå¾ã«ä»¥ä¸ã®ãããªã¡ãã»ã¼ã¸ã表示ãããã
ããã㦠tzinfo-data
ã¨ãã gem
ãã¤ã³ã¹ãã¼ã«ããã
sudo gem install tzinfo-data --no-ri --no-rdoc -V
kibana ãèµ·åãã¦ã¿ã
cd ~/Kibana ruby kibana.rb
ãå®è¡ããã¨ä»¥ä¸ã®ãããªã¡ãã»ã¼ã¸ã表示ãããã
ãã©ã¦ã¶ã§ã¯ $Server_IP:5601
ã«ã¢ã¯ã»ã¹ããã¨ä»¥ä¸ã®ããã«è¡¨ç¤ºããã¦å¬ããã
fluent-plugin-elasticsearch ã®è¨å®
fluent-plugin-elasticsearch ã®ã¤ã³ã¹ãã¼ã«
Elasticsearch 㨠kibana ã®çµã¿åãã㧠fluentd
ãå©ç¨ããçºã« fluent-plugin-elasticsearch
ãã¤ã³ã¹ãã¼ã«ããã
/usr/lib/fluent/ruby/bin/fluent-gem install fluent-plugin-elasticsearch --no-ri --no-rdoc -V
td-agent.conf ã®è¨å®
fluent-plugin-elasticsearch
ãæ±ãçºã« td-agent
ã以ä¸ã®ããã«è¨å®ããã
è¨å®ã®ãã¢ã¨ãã¦ã¯ include_tag_key true
㨠tag_key @log_name
ã§ãä¸è¨ä¾ã®å ´åãããããè¨å®ãããã¨ã§ @tag_key
ã debian.apache.access
ã¨ãªããè¤æ°ã®ãã¹ããããã°ãéããã¦ã kibana
ä¸ã§ tag_key
ã§çµãè¾¼ããã¨ãå¯è½ã¨ãªãã
ï¼ä»¥ä¸ã追è¨ï¼
logstash_format true
ã®å ´åindex_name
ä¸è¦
使ã£ã¦ã¿ã
å®éã«ãã°ãè¦ã¦ã¿ã
ab
ã§é©å½ã«ã¢ã¯ã»ã¹ãå½è£
ãã¦ãã°ãåºåãã¦ã¿ãã
é©å½ã«ã¢ã¯ã»ã¹ãã¦ã¿ã
ab
ã§é©å½ã«ã¢ã¯ã»ã¹ãå½è£
ãã¦ã¿ãã
ab -c 10 -n 10 http://xxx.xxx.xxx.xxx/
kibana ã«ã¢ã¯ã»ã¹ãã
kibana
ã«ã¢ã¯ã»ã¹ãã¦ãã°ãè¨é²ããã¦ãããã確èªããã
ã¨ãããã¨ã§
- fluentd 㨠Elasticsearch 㨠kibana ã®çµã¿åããã£ã¦ããï¼