Monitor incoming Kubernetes HTTP requests in Google Stackdriver

10/4/2019

I have a Google Kubernetes Engine running in the Google Cloud Platform.

I would now like to know how many HTTP requests are received by our Kubernetes cluster. I'd like that to be displayed in Google Stackdriver.

Unfortunately I can't find any appropriate metric in the documentation at https://cloud.google.com/monitoring/api/metrics_kubernetes.

Is there a way to get a chart with the count of all incoming HTTP request to a GKE cluster in Stackdriver?

-- Harold L. Brown
google-cloud-platform
google-cloud-stackdriver
google-kubernetes-engine
http
stackdriver

1 Answer

10/4/2019

Unfortunately, that's a limitation of Kubernetes itself - it doesn't expose very much information about the services running in it. You'll need to either install Istio and configure the Stackdriver adapter (see my post on this) or use something like OpenCensus in your app to create a custom metric. Another option would be to create a log-based metric to count the requests.

-- Yuri Grinshteyn
Source: StackOverflow