Route hostname not visible in Ingress access logging

Solution Verified - Updated -

Issue

  • After configuring Ingress access logging as per the documentation Configuring Ingress access logging, the route hostname not visible in the logs for which requests were generated.
$ 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