GKE NGINX Ingress - no data in Stackdriver

12/25/2019

I have successfully set up an NGINX ingress on GKE. It's been handling traffic for a while, so all good there.

However, it does not seem to be reporting metrics data to Stackdriver. I am not sure if it should be doing this out-of-the-box or if I have to configure something (perhaps this?: https://cloud.google.com/monitoring/agent/plugins/nginx). The instructions for this plug-in are clear but do not seem compatible with the layout of the NGINX pod (i.e.: can't run sudo commands, directory structure is different, etc).

This is what I see when I try to add a chart to show NGINX connections in my Stackdriver dashboard.

Active Connections Metric in Stackdriver

If anyone could shed light on how I can get GKE-deployed NGINX ingresses to report metrics to Stackdriver I'd be appreciative! :)

Cheers, Ben

-- benjimix
google-cloud-monitoring
google-kubernetes-engine
nginx
stackdriver

1 Answer

12/25/2019

It looks like you choose wrong Resourse type because GCE VM Instance you should use for A virtual machine instance hosted in Google Compute Engine (GCE) and here you have GKE-deployed NGINX ingresses.

EDIT I think you should use this guide as an example to get metrics you want in Stackdriver.

EDIT 2 You can find more information about it here and here

-- Serhii Rohoza
Source: StackOverflow