Search code examples
httpgoogle-cloud-platformgoogle-kubernetes-enginestackdrivergoogle-cloud-stackdriver

Monitor incoming Kubernetes HTTP requests in Google Stackdriver


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?


Solution

  • 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.