Translated message

A translation of this page exists in English.

Ingress 访问日志中没有包括路由主机名

Solution In Progress - Updated -

Issue

  • 在根据配置 Ingress 访问日志的文档配置了 Ingress 日志后,在日志中并没有包括请求创建的路由主机名。
$ oc get ingresscontroller/default -oyaml -n openshift-ingress-operator | grep -i logging -A4
  logging:
    access:
      destination:
        type: Container
      logEmptyRequests: Log

$ oc project openshift-ingress

$ oc get pod
NAME                              READY   STATUS    RESTARTS   AGE
router-default-64b565cf6c-g8q5h   2/2     Running   0          82s
router-default-64b565cf6c-lkvhx   2/2     Running   0          114s

$ curl -kv https://console-openshift-console.apps.cluster.example.com
* About to connect() to console-openshift-console.apps.cluster.example.com port 443 (#0)
*   Trying 10.x.x.x...
* Connected to console-openshift-console.apps.cluster.example.com (10.x.x.x) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb

$ oc logs router-default-64b565cf6c-g8q5h -c logs
...
2023-09-09T09:19:28.928044+00:00 worker-0 worker-0.cluster.example.com haproxy[30]: 10.x.x.x:49994 [09/Sep/2023:09:19:28.875] fe_sni~ be_secure:openshift-console:console/pod:console-6c746ffd57-t5fd4:console:https:10.x.x.x:8443 0/0/0/48/52 200 42671 - - --VN 21/9/7/7/0 0/0 "GET /api/prometheus/api/v1/rules HTTP/1.1"

Environment

  • Red Hat OpenShift Container Platform (OCP)
    • 4.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content