How to monitor http metrics (such as response time or http status code) with Google monitoring stackdriver agent?

Viewed 1227

I think I have a really simple use case:

  • a spring boot java application that exposes metrics through an endpoint (localhost:8002/metrics) and through JMX
  • a google compute engine machine that hosts that application (or a pod in Google Container Engine)

I want to have in the monitoring dashboards simple metrics exposed from spring boot (like http status code, http response time percentiles, etc..). In some way it's something really similar to what appengine offers, but on a GCE/GKE instance.

I tried to:

  • configure a stackdriver agent with jvm collector -> PROBLEM: only basic jvm metrics are collected
  • configure a stackdriver agent with collectd plugins that retrieve my metrics and push to google cloud monitoring -> PROBLEM: I got several errors because the agent cannot understand the collectd jmx/json plugins
  • pass through a Google Cloud Load Balancing -> PROBLEM: apparently there are no metrics for that service
  • pass through a nginx server and configured a stackdriver agent with nginx collector -> PROBLEM: again only really basic metrics are collected

So the real questions are:

  • am I missing something or the only way is to go through custom metrics?
  • apart from java/spring boot/etc .. Is anyone here that has applications running on Google Cloud and is monitoring these kinds of metrics with Stackdriver?

BTW: in case someone is interested to help, here is the github repo where I am starting to make some experiments

0 Answers
Related