Trace kong ingress requests in GCP similar to GCLB

Hi,

We’re migrating from kong gateway to kong ingress in GKE and I have a logging question.

Now we’re able to trace and find requests to our environment using this query in GCP logging (Google Cloud Platform):

resource.labels.url_map_name="xxxx"
httpRequest.status>=500
httpRequest.requestUrl="https://...."

with ingress as I understand there is no load balancer and it’s more of a reverse proxy so no load balancer is created (no url_map_name in query) when kong ingressClass and not default GKE ingressClass is used.

GCLB also shows some useful information such as remoteIp, request/responseSize, userAgent…

My question is, how do I achieve the same level of logging with kong ingress controller?

Thanks

You can enable one of a number of logging plugins: Kong Hub | Plugins and Integrations | Kong Docs

These use a standard JSON format across all log plugins, which many log aggregators should be able to parse automatically (e.g. you could search for response.status >= 500 and request.url = https://whatever or similar, depending on your system’s query format).

1 Like