Skip to content

Browsing NATS messages in Kibana

Eduardo Aceituno edited this page Jul 2, 2013 · 1 revision

Install ElasticSearch

Download

curl -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.2.tar.gz

Unpack

tar xvzf elasticsearch-0.90.2.tar.gz

Start

cd elasticsearch-0.90.2/
./bin/elasticsearch -f

Install Kibana

Download

git clone git://github.com/rashidkpc/Kibana.git
cd Kibana
bundle install

Configure

In KibanaConfig.rb set Default_Fields to

Default_fields = ['tag','@message']

Start

bundle exec ruby kibana.rb

Configure Fluentd

Gemfile

Create Gemfile

source https://rubygems.org
gem "fluent-plugin-elasticsearch", "0.1.1", :git => "https://github.com/achied/fluent-plugin-elasticsearch.git", :ref => "unparsed_event"
gem "fluent-plugin-nats", "0.0.5", :git => "https://github.com/cloudfoundry-community/fluent-plugin-nats", :ref => "kibana"
gem "fluentd"

Install gems

bundle install

Fluentd config file

Create file fluentd_nats.conf

<source>
  type nats
  tag nats
  host localhost
  port 4222
  user nats
  password nats
  queue >
  ssl false
</source>

<match **>
  type elasticsearch
  logstash_format true
  logstash_include_message true
  include_tag_key true
  flush_interval 5s # for testing
</match>

Start fluentd

fluentd -c fluentd_nats.conf

Browse messages in localhost:5601