Configuration

You can use Elasticsearch as the data store for the events sent by TAG. These events will show up in different dashboards in Kibana which will give you a great view of everything running on server.

To connect the TAG to Elasticsearch and Kibana, you require the following configuration in the file conf/tomee.xml:

  <Resource id="ElasticSearchClient" class-name="com.tomitribe.tomee.metrics.core.elasticsearch.ElasticSearchFastEventDataStore">
    collectors = https://localhost:9200
    period = 60000
    create = true
    kibanaBase = https://localhost:5601
    username = username
    password = password
  </Resource>

  <Resource id="MetricsService" class-name="com.tomitribe.tomee.metrics.core.service.MetricsService">
    dataStore = ElasticSearchClient
    dataCenter = DC
  </Resource>

Check the table below with the detailed information about each property in the XML.

Key Description Default value

collectors

The elasticsearch hosts and port, split by comma, where the TAG will send events information.

mandatory

period

The period to send information in milliseconds

60000

create

To create all the required structure into Elasticsearch and Kibana, false will assume that nothing is required. Recommended to set it up to true

false

kibanaBase

The Kibana host and port

mandatory

indexPattern

The index pattern to be created for storage in elasticsearch

tribe-metrics-{{yyyy-MM-dd}}

username

Basic authorization username required by the elasticsearch host

optional

password

Basic authorization password required by the elasticsearch host. This can optionally be the ciphered password, by prefixing with 'cipher:<cipher-name>:'. For example: cipher:Static3DES:snYpqPMRcXg=

optional

dataStore

The data store name is a reference to the data store resource also specified in tomee.xml.

mandatory

dataCenter

The data center name

optional

The next time you start TAG with the supplied configuration, you require a running Elasticsearh and Kibana instance for the TAG to run properly. If everything is OK, you should see the following lines in the log:

...
[TRIBESTREAM] INFO - Finding Elasticsearch version for http://localhost:9200
[TRIBESTREAM] INFO - Elasticsearch http://localhost:9200 is using version 5.6.4
[TRIBESTREAM] INFO - Adding Elasticsearch Template to http://localhost:9200
...
[TRIBESTREAM] INFO - Finding Kibana version for http://localhost:5601
[TRIBESTREAM] INFO - Kibana http://localhost:5601 is using version 5.6.4
[TRIBESTREAM] INFO - Adding Default Kibana Index Template to http://localhost:9200
[TRIBESTREAM] INFO - Adding Kibana Visualizations to http://localhost:9200
...

With this, TAG will start pushing Metrics data into Elasticsearch.