Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save keisatou/7753062 to your computer and use it in GitHub Desktop.
Save keisatou/7753062 to your computer and use it in GitHub Desktop.
# http://docs.fluentd.org/articles/free-alternative-to-splunk-by-fluentd
# td-agentを既にbrewで入れてしまったときの手順。
for i in fluent-plugin-elasticsearch fluent-plugin-kibana-server fluent-plugin-embedded-elasticsearch
do
echo $i
done
curl -Ls http://docs.fluentd.org/misc/fluentd-kibana-elasticsearch/fluentd-kibana-elasticsearch.conf > test.conf
mkdir -p var/log/kibana
td-agent -c test.conf
# add data: http://localhost:8888/es/test?json={%22message%22:%22hello%20world!%22}
# kibana: http://localhost:24300/kibana/index.html#/dashboard/file/logstash.json
# ↑このダッシュボードページは(Logstash Dashboard)のリンクをクリックすると表示される
<source>
type embedded_elasticsearch
</source>
<source>
type kibana_server
bind 0.0.0.0
port 24300
mount /kibana/
access_log_path var/log/kibana/access.log
elasticsearch_url http://localhost:9200
</source>
<source>
type http
port 8888
</source>
<match es.**>
type copy
<store>
type elasticsearch
logstash_format true
index_name fluentd
type_name fluentd
flush_interval 3
</store>
<store>
type stdout
</store>
</match>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment