Recipe for Elasticsearch

The Logging service requires certain properties written for 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_verbose_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>",
  "td_agent_out_elasticsearch_user" : "user", "td_agent_out_elasticsearch_password" : "xxxxxx",
  "td_agent_out_elasticsearch_protocol" : "https",
  "td_agent_out_elasticsearch_ssl_version" : "TLSv1_2",
  "td_agent_out_elasticsearch_cafile" : "<valid certificate name>"
 }
 
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_verbose_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>",
  "td_agent_out_metric_elasticsearch_user" : "user", "td_agent_out_metric_elasticsearch_password" : "xxxxxx",
  "td_agent_out_metric_elasticsearch_protocol" : "https",
  "td_agent_out_metric_elasticsearch_ssl_version" : "TLSv1_2",
  "td_agent_out_metric_elasticsearch_cafile" : "<valid certificate name>"
 }
 
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_verbose_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>",
  "td_agent_out_container_elasticsearch_user" : "user", "td_agent_out_container_elasticsearch_password" : "xxxxxx",
  "td_agent_out_container_elasticsearch_protocol" : "https",
  "td_agent_out_container_elasticsearch_ssl_version" : "TLSv1_2",
  "td_agent_out_container_elasticsearch_cafile" : "<valid certificate name>"
}

4. For verbose 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" : "DEFAULT",
  "td_agent_verbose_output_channelType" : "ELASTICSEARCH",
  "td_agent_out_verbose_elasticsearch_host" : "<network reachable elastic search host>",
  "td_agent_out_verbose_elasticsearch_port" : "<valid ES port>",
  "td_agent_out_verbose_elasticsearch_index" : "<elastic search index to update for new entries>",
  "td_agent_out_verbose_elasticsearch_user" : "user",
  "td_agent_out_verbose_elasticsearch_password" : "xxxxxx",
  "td_agent_out_verbose_elasticsearch_protocol" : "https",
  "td_agent_out_verbose_elasticsearch_ssl_version" : "TLSv1_2",
  "td_agent_out_verbose_elasticsearch_cafile" : "<valid certificate name>"
}

NOTE :
User can send all the 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",
  "td_agent_verbose_output_channelType" : "ELASTICSEARCH",
  "td_agent_out_verbose_elasticsearch_host" : "<network reachable elastic search host>",
  "td_agent_out_verbose_elasticsearch_port" : "<valid ES port>",
  "td_agent_out_verbose_elasticsearch_index" : "verbose"
 }