gopkg.in/dotcloud/docker.v1@v1.13.1/daemon/metrics.go (about) 1 package daemon 2 3 import "github.com/docker/go-metrics" 4 5 var ( 6 containerActions metrics.LabeledTimer 7 imageActions metrics.LabeledTimer 8 networkActions metrics.LabeledTimer 9 engineVersion metrics.LabeledGauge 10 engineCpus metrics.Gauge 11 engineMemory metrics.Gauge 12 healthChecksCounter metrics.Counter 13 healthChecksFailedCounter metrics.Counter 14 ) 15 16 func init() { 17 ns := metrics.NewNamespace("engine", "daemon", nil) 18 containerActions = ns.NewLabeledTimer("container_actions", "The number of seconds it takes to process each container action", "action") 19 for _, a := range []string{ 20 "start", 21 "changes", 22 "commit", 23 "create", 24 "delete", 25 } { 26 containerActions.WithValues(a).Update(0) 27 } 28 networkActions = ns.NewLabeledTimer("network_actions", "The number of seconds it takes to process each network action", "action") 29 engineVersion = ns.NewLabeledGauge("engine", "The version and commit information for the engine process", metrics.Unit("info"), 30 "version", 31 "commit", 32 "architecture", 33 "graph_driver", "kernel", 34 "os", 35 ) 36 engineCpus = ns.NewGauge("engine_cpus", "The number of cpus that the host system of the engine has", metrics.Unit("cpus")) 37 engineMemory = ns.NewGauge("engine_memory", "The number of bytes of memory that the host system of the engine has", metrics.Bytes) 38 healthChecksCounter = ns.NewCounter("health_checks", "The total number of health checks") 39 healthChecksFailedCounter = ns.NewCounter("health_checks_failed", "The total number of failed health checks") 40 imageActions = ns.NewLabeledTimer("image_actions", "The number of seconds it takes to process each image action", "action") 41 metrics.Register(ns) 42 }