v0.0.0-...-04a75a9 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2015 License: Apache-2.0, MIT Imports: 7 Imported by: 0


#Container Metrics Sample

##Overview We can use Dropsonde to send container metrics to metron which will emit them to Doppler; which is then polled by traffic controller. The endpoint on the traffic controller should report the latest container metric for each instance of the specified app.

main.go connects to the traffic controller and polls the container metrics endpoint.

container_metrics_emitter.go is a sample app that emits container metrics to metron using the dropsonde library.

##To see containter metrics:

  1. Run

     cf api api.the-env
     cf login admin
     cf push some-app
     cf app some-app --guid
  2. Copy out the guid value from the last bash line

  3. Paste the guid into the container_metrics_emitter.go and main.go as the appId value at the top of the files

  4. In the main.go update the DopplerAddress value by replacing '' with the value for the environment you are testing.

  5. Start the listener

     export CF_ACCESS_TOKEN=`cf oauth-token | tail -n 1`
     go run main.go
  6. Now build the container_metrics_emitter.go in a new bash window with:

     GOPATH=~/go GOOS=linux go build container_metrics_emitter.go
  7. Move the container_metrics_emitter executable onto a machine with metron running inside your cf deployment

     ssh-add keyfile
     scp container_metrics_emitter vcap@bosh.the-env:container_metrics_emitter
     ssh -A vcap@bosh.the-env
  8. You can get a vm ip by doing bosh vms and selecting an ip

     scp container_metrics_emitter vcap@some.vm.ip:container_metrics_emitter
     ssh vcap@some.vm.ip
  9. You should now see metrics appearing in the listener window

###Things to look for:

  1. the diskBytes value should be increasing.
  2. 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
  3. there should be only entries for the applicationId you entered with multiple instance indexes


The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL