Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ContainerActions tracks the time taken to process container operations ContainerActions = metricsNS.NewLabeledTimer("container_actions", "The number of seconds it takes to process each container action", "action") // NetworkActions tracks the time taken to process network operations NetworkActions = metricsNS.NewLabeledTimer("network_actions", "The number of seconds it takes to process each network action", "action") // HostInfoFunctions tracks the time taken to gather host information HostInfoFunctions = metricsNS.NewLabeledTimer("host_info_functions", "The number of seconds it takes to call functions gathering info about the host", "function") ImageActions = metricsNS.NewLabeledTimer("image_actions", "The number of seconds it takes to process each image action", "action") // EngineInfo provides information about the engine and its environment EngineInfo = metricsNS.NewLabeledGauge("engine", "The information related to the engine and the OS it is running on", gometrics.Unit("info"), "version", "commit", "architecture", "graphdriver", "kernel", "os", "os_type", "os_version", "daemon_id", ) // EngineCPUs tracks the number of CPUs available to the engine EngineCPUs = metricsNS.NewGauge("engine_cpus", "The number of cpus that the host system of the engine has", gometrics.Unit("cpus")) // EngineMemory tracks the amount of memory available to the engine EngineMemory = metricsNS.NewGauge("engine_memory", "The number of bytes of memory that the host system of the engine has", gometrics.Bytes) // HealthChecksCounter tracks the total number of health checks HealthChecksCounter = metricsNS.NewCounter("health_checks", "The total number of health checks") // HealthChecksFailedCounter tracks the number of failed health checks HealthChecksFailedCounter = metricsNS.NewCounter("health_checks_failed", "The total number of failed health checks") // HealthCheckStartDuration tracks the time taken to prepare health checks HealthCheckStartDuration = metricsNS.NewTimer("health_check_start_duration", "The number of seconds it takes to prepare to run health checks") // StateCtr tracks container states StateCtr = newStateCounter(metricsNS, metricsNS.NewDesc("container_states", "The count of containers in various states", gometrics.Unit("containers"), "state")) // EventsCounter tracks the number of events logged EventsCounter = metricsNS.NewCounter("events", "The number of events logged") // EventSubscribers tracks the number of current subscribers to events EventSubscribers = metricsNS.NewGauge("events_subscribers", "The number of current subscribers to events", gometrics.Total) )
Functions ¶
func CleanupPlugin ¶
func CleanupPlugin(store plugingetter.PluginGetter)
CleanupPlugin stops metrics collection for all plugins
func RegisterPlugin ¶
RegisterPlugin starts the metrics server listener and registers the metrics plugin callback with the plugin store
func StartTimer ¶
Types ¶
type StateCounter ¶
type StateCounter struct {
// contains filtered or unexported fields
}
StateCounter tracks container states
func (*StateCounter) Collect ¶
func (ctr *StateCounter) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector
func (*StateCounter) Delete ¶
func (ctr *StateCounter) Delete(id string)
Delete removes a container's state
func (*StateCounter) Describe ¶
func (ctr *StateCounter) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector
func (*StateCounter) Get ¶
func (ctr *StateCounter) Get() (running int, paused int, stopped int)
Get returns the count of containers in running, paused, and stopped states
func (*StateCounter) Set ¶
func (ctr *StateCounter) Set(id, label string)
Set updates the state for a container
Click to show internal directories.
Click to hide internal directories.