Recipe for Elasticsearch

The Logging service requires certain properties to write to Elasticsearch destinations. See the Log Service Configuration Properties table for valid values.

tml_log_properties.json
1. For access logs :
 
{
  "tmg-internal-statusCheck":"OFF",
  "tmgc_log_service_logLevel" : "info",
  "logserviceURL" : "localhost",
  "td_agent_metric_output_channelType" : "DEFAULT",
  "td_agent_container_output_channelType" : "DEFAULT",
  "td_agent_output_channelType" : "ELASTICSEARCH",
  "td_agent_out_elasticsearch_host" : "<network reachable elastic search host>",
  "td_agent_out_elasticsearch_port" : "<valid ES port>",
  "td_agent_out_elasticsearch_index" : "<elastic search index to update for new entries>"
 }
 
2. For metrics logs :
 
{
  "tmg-internal-statusCheck":"OFF",
  "tmgc_log_service_logLevel" : "info",
  "logserviceURL" : "localhost",
  "td_agent_container_output_channelType" : "DEFAULT",
  "td_agent_output_channelType" : "DEFAULT",
  "td_agent_metric_output_channelType" : "ELASTICSEARCH",
  "td_agent_out_metric_elasticsearch_host" : "<network reachable elastic search host>",
  "td_agent_out_metric_elasticsearch_port" : "<valid ES port>",
  "td_agent_out_metric_elasticsearch_index" : "<elastic search index to update for new entries>"
 }
 
3. For Component/Container's logs :
 
{
  "tmg-internal-statusCheck":"OFF",
  "tmgc_log_service_logLevel" : "info",
  "logserviceURL" : "localhost",
  "td_agent_output_channelType" : "DEFAULT",
  "td_agent_metric_output_channelType" : "DEFAULT",
  "td_agent_container_output_channelType" : "ELASTICSEARCH",
  "td_agent_out_container_elasticsearch_host" : "<network reachable elastic search host>",
  "td_agent_out_container_elasticsearch_port" : "<valid ES port>",
  "td_agent_out_container_elasticsearch_index" : "<elastic search index to update for new entries>"
 }
 
NOTE :
User can send all the three types of logs to same elastic search, but index should be different in order to distinguish between different types of logs.
 
e.g.
{
  "tmg-internal-statusCheck":"OFF",
  "tmgc_log_service_logLevel" : "info",
  "logserviceURL" : "localhost",
  "td_agent_container_output_channelType" : "ELASTICSEARCH",
  "td_agent_out_container_elasticsearch_host" : "<network reachable elastic search host>",
  "td_agent_out_container_elasticsearch_port" : "<valid ES port>",
  "td_agent_out_container_elasticsearch_index" : "container",
  "td_agent_metric_output_channelType" : "ELASTICSEARCH",
  "td_agent_out_metric_elasticsearch_host" : "<network reachable elastic search host>",
  "td_agent_out_metric_elasticsearch_port" : "<valid ES port>",
  "td_agent_out_metric_elasticsearch_index" : "metrics",
  "td_agent_output_channelType" : "ELASTICSEARCH",
  "td_agent_out_elasticsearch_host" : "<network reachable elastic search host>",
  "td_agent_out_elasticsearch_port" : "<valid ES port>",
  "td_agent_out_elasticsearch_index" : "access"
 }