We can use Dropsonde to send container metrics to metron which will emit them
to Doppler; which is then polled by trafficcontroller. The endpoint on the
trafficcontroller should report the latest container metric for each instance
of the specified app.
samples/container_metrics/consumer/main.go connects to the trafficcontroller
and polls the container metrics endpoint.
samples/container_metrics/emitter/main.go is a sample app that emits container
metrics to metron using the dropsonde library.
To see containter metrics:
Push an app:
cf push some-app
Export the app's guid as an environment variable:
export APP_GUID=$(cf app some-app --guid)
Take note of the app GUID, you will need it later:
echo $APP_GUID
Set the doppler address as an environment variable:
You should now see metrics appearing in the listener window.
Things to look for:
The diskBytes value should be increasing.
The diskBytes value should be skipping some numbers, this is b/c we are
listening on a three second window, but publishing on a one second window
and are only returning the most recent result.
There should be only entries for the applicationId you entered with multiple
instance indexes.