Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-5849

The log stream name of journal logs contains duplicated hostname, e.g.: ip-10-0-60-6.ip-10-0-60-6.journal.system.

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • OBSDA-550 - Updated APIs for Logging 6.0
    • VERIFIED
    • Release Note Not Required
    • Log Collection - Sprint 257
    • Moderate

      Description of problem:

      The log stream name of journal logs contains duplicated hostname, e.g.:  

      ip-10-0-22-113.ip-10-0-22-113.journal.system
      ip-10-0-27-1.ip-10-0-27-1.journal.system
      ip-10-0-57-118.ip-10-0-57-118.journal.system
      ip-10-0-60-6.ip-10-0-60-6.journal.system
      ip-10-0-74-219.ip-10-0-74-219.journal.system
      ip-10-0-92-125.ip-10-0-92-125.journal.system localhost.localdomain.localhost.localdomain.journal.system
      localhost.localhost.journal.system

      vector.toml vector.toml:

       # Cloudwatch Stream Names
       [transforms.output_cloudwatch_normalize_streams]
       type = "remap"
       inputs = ["pipeline_to_cloudwatch_viaq_1"]
       source = '''
         .stream_name = "default"
         if ( .log_type == "audit" ) {
          .stream_name = (.hostname +"."+ downcase(.log_source)) ?? .stream_name
         }
         if ( .log_source == "node" ) {
          .stream_name =  ( .hostname + ".journal.system" ) ?? .stream_name
         }
         if ( .log_source == "container" ) {
           k = .kubernetes
           .stream_name = (k.namespace_name+"_"+k.pod_name+"_"+k.container_name) ?? .stream_name
         }
         if ( .log_type == "infrastructure" ) {
          .stream_name = ( .hostname + "." + .stream_name ) ?? .stream_name
         }
         del(.tag)
         del(.source_type)
       ''' 

      Version-Release number of selected component (if applicable):

      cluster-logging.v6.0.0

      How reproducible:

      Always

      Steps to Reproduce:

      1. Forward logs to cloudwatch
      2. Check log streams in cloudwatch

      Actual results:

      ip-10-0-60-6.ip-10-0-60-6.journal.system.

      Expected results:

      ip-10-0-60-6.journal.system.

      Additional info:

            cahartma@redhat.com Casey Hartman
            qitang@redhat.com Qiaoling Tang
            Qiaoling Tang Qiaoling Tang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: