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

Clicking the `See related logs` button can't find related logs in Console.

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • VERIFIED
    • Before this fix, the see related logs was always shown leading to errors when korrel8r was not present in the cluster. After the fix, the link is not shown if korrel8r is not present.
    • Developer Preview

      Description of problem:

      After enabling logging console plugin, clicking `See related logs` button in `Alert details` page can't find related logs and get error in console:

      Parse error at line 1, col 46: syntax error: unexpected IDENTIFIER 

      Alert rule:

            - alert: KubeContainerWaiting
              annotations:
                description: pod/{{ $labels.pod }} in namespace {{ $labels.namespace }}
                  on container {{ $labels.container}} has been in waiting state for longer
                  than 1 hour.
                summary: Pod container waiting longer than 1 hour
              expr: |
                sum by (namespace, pod, container, cluster) (kube_pod_container_status_waiting_reason{namespace=~"(openshift-.*|kube-.*|default)",job="kube-state-metrics"}) > 0
              for: 1h
              labels:
                severity: warning

      URL after clicking button `See related logs`:

      https://console-openshift-console.apps.xxxx.openshift.com/monitoring/logs?q=sum+by+%28namespace%2C+pod%2C+container%2C+cluster%29+%28kube_pod_container_status_waiting_reason%7B+job%3D%22kube-state-metrics%22%2C+namespace%3D%7E%22%28openshift-.*%7Ckube-.*%7Cdefault%29%22%2C+log_type%3D%22application%22+%7D%29+%3E+0 

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

      openshift-logging/loki-rhel9-operator/images/v5.8.1-1

      openshift-logging/cluster-logging-rhel9-operator/images/v5.8.1-4

      openshift-logging/logging-view-plugin-rhel9/images/v5.8.1-1

      cluster version: 4.14.0-0.nightly-2023-11-06-123437

      How reproducible:

      Always

      Steps to Reproduce:

      1. Deploy logging stack, using loki as the default log store
      2. Enable logging console plugin
      3. Log into OCP Administrator console, go to Observe --> Alerting page, then click one alert, wait for the `Alert details` page to be loaded, click `See related logs` button in the upper right corner

      Actual results:

      Web console raises error

      Expected results:

      No error in console.

      Redirect to related logs. Or hide this button if that is a TBD feature.

      Additional info:

            anpicker@redhat.com Andrew Pickering
            qitang@redhat.com Qiaoling Tang
            Qiaoling Tang Qiaoling Tang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: