Uploaded image for project: 'Cluster Observability Operator'
  1. Cluster Observability Operator
  2. COO-746

Failed to query metrics from thanos, can do from prometheus

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 1.1.0
    • 1.1.0
    • monitoring-stack
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • MON Sprint 267
    • None
    • None
    • None

      No such issue when install upstream catalog image

      execute automation 

      TestThanosQuerierController/Create_resources_for_single_monitoring_stack_with_web_endpoint_TLS 

      or create monitoringstack

      % oc -n e2e-tests get monitoringstack tq-ms-combo-tls -oyaml
      apiVersion: monitoring.rhobs/v1alpha1
      kind: MonitoringStack
      metadata:
        creationTimestamp: "2025-03-13T09:23:57Z"
        finalizers:
        - monitoring.observability.openshift.io/finalizer
        generation: 1
        labels:
          stack: mso-e2e
        name: tq-ms-combo-tls
        namespace: e2e-tests
        resourceVersion: "172006"
        uid: 6dcd560f-8e7a-46c2-867a-5105a4ca59bc
      spec:
        alertmanagerConfig:
          disabled: false
        logLevel: info
        prometheusConfig:
          replicas: 2
        resourceSelector: {}
        resources: {}
        retention: 120h 

      create thanosquerier

      % oc -n e2e-tests get thanosquerier tq-ms-combo-tls -oyaml
      apiVersion: monitoring.rhobs/v1alpha1
      kind: ThanosQuerier
      metadata:
        creationTimestamp: "2025-03-13T09:23:56Z"
        generation: 1
        labels:
          stack: mso-e2e
        name: tq-ms-combo-tls
        namespace: e2e-tests
        resourceVersion: "156993"
        uid: c6ae2a73-065e-463b-9496-1137b8398211
      spec:
        namespaceSelector: {}
        selector:
          matchLabels:
            stack: mso-e2e
        webTLSConfig:
          certificate:
            key: tls.crt
            name: thanos-test-tls-secret
          certificateAuthority:
            key: ca.crt
            name: thanos-test-tls-secret
          privateKey:
            key: tls.key
            name: thanos-test-tls-secret 
      % oc -n e2e-tests get pod
      NAME                                              READY   STATUS    RESTARTS   AGE
      alertmanager-tq-ms-combo-tls-0                    2/2     Running   0          63m
      alertmanager-tq-ms-combo-tls-1                    2/2     Running   0          63m
      prometheus-tq-ms-combo-tls-0                      3/3     Running   0          63m
      prometheus-tq-ms-combo-tls-1                      3/3     Running   0          63m
      thanos-querier-tq-ms-combo-tls-554c95cc5d-w975g   1/1     Running   0          63m
      % oc -n e2e-tests get svc
      NAME                             TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
      alertmanager-operated            ClusterIP   None             <none>        9093/TCP,9094/TCP,9094/UDP   63m
      prometheus-operated              ClusterIP   None             <none>        9090/TCP,10901/TCP           64m
      thanos-querier-tq-ms-combo-tls   ClusterIP   172.30.242.8     <none>        10902/TCP                    64m
      tq-ms-combo-tls-alertmanager     ClusterIP   172.30.249.178   <none>        9093/TCP                     63m
      tq-ms-combo-tls-prometheus       ClusterIP   172.30.183.165   <none>        9090/TCP                     64m
      tq-ms-combo-tls-thanos-sidecar   ClusterIP   None             <none>        10901/TCP                    64m 
      % oc -n e2e-tests port-forward svc/thanos-querier-tq-ms-combo-tls 10902:10902 
                     
      % curl -k 'https://localhost:10902/api/v1/query?' --data-urlencode 'query=alertmanager_build_info' | jq   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                  Dload  Upload   Total   Spent    Left  Speed 100   107  100    78  100    29     72     26  0:00:01  0:00:01 --:--:--    98 {   "status": "success",   "data": {     "resultType": "vector",     "result": [],     "analysis": {}   } }
      % oc -n e2e-tests port-forward svc/tq-ms-combo-tls-prometheus 9090:9090 
      % curl 'http://localhost:9090/api/v1/query?' --data-urlencode 'query=alertmanager_build_info' | jq   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                  Dload  Upload   Total   Spent    Left  Speed 100   890  100   861  100    29   1203     40 --:--:-- --:--:-- --:--:--  1243 {   "status": "success",   "data": {     "resultType": "vector",     "result": [       {         "metric": {           "__name__": "alertmanager_build_info",           "container": "alertmanager",           "endpoint": "web",           "goarch": "amd64",           "goos": "linux",           "goversion": "go1.22.9 (Red Hat 1.22.9-2.el9_5)",           "instance": "10.131.0.93:9093",           "job": "alertmanager-self",           "namespace": "e2e-tests",           "pod": "alertmanager-tq-ms-combo-tls-0",           "revision": "unknown",           "service": "tq-ms-combo-tls-alertmanager",           "tags": "netgo"         },         "value": [           1741861285.694,           "1"         ]       },       {         "metric": {           "__name__": "alertmanager_build_info",           "container": "alertmanager",           "endpoint": "web",           "goarch": "amd64",           "goos": "linux",           "goversion": "go1.22.9 (Red Hat 1.22.9-2.el9_5)",           "instance": "10.129.2.152:9093",           "job": "alertmanager-self",           "namespace": "e2e-tests",           "pod": "alertmanager-tq-ms-combo-tls-1",           "revision": "unknown",           "service": "tq-ms-combo-tls-alertmanager",           "tags": "netgo"         },         "value": [           1741861285.694,           "1"         ]       }     ]   } }
      

              jfajersk@redhat.com Jan Fajerski
              hongyli@redhat.com Hongyan Li
              None
              None
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: