metrics

package
v0.0.0-...-7b3a75c Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterError

func RegisterError(err errors.AutoscalerError)

RegisterError records any errors preventing Cluster Autoscaler from working. No more than one error should be recorded per loop.

func RegisterEvictions

func RegisterEvictions(podsCount int)

RegisterEvictions records number of evicted pods

func RegisterScaleDown

func RegisterScaleDown(nodesCount int, reason NodeScaleDownReason)

RegisterScaleDown records number of nodes removed by scale down

func RegisterScaleUp

func RegisterScaleUp(nodesCount int)

RegisterScaleUp records number of nodes added by scale up

func UpdateClusterState

func UpdateClusterState(csr *clusterstate.ClusterStateRegistry)

UpdateClusterState updates metrics related to cluster state

func UpdateDuration

func UpdateDuration(label string, start time.Time)

UpdateDuration records the duration of the step identified by the label

func UpdateLastTime

func UpdateLastTime(label string, now time.Time)

UpdateLastTime records the time the step identified by the label was started

func UpdateUnneededNodesCount

func UpdateUnneededNodesCount(nodesCount int)

UpdateUnneededNodesCount records number of currently unneeded nodes

func UpdateUnschedulablePodsCount

func UpdateUnschedulablePodsCount(podsCount int)

UpdateUnschedulablePodsCount records number of currently unschedulable pods

Types

type HealthCheck

type HealthCheck struct {
	// contains filtered or unexported fields
}

HealthCheck contains information about last time of autoscaler activity and timeout

func NewHealthCheck

func NewHealthCheck(activityTimeout, successTimeout time.Duration) *HealthCheck

NewHealthCheck builds new HealthCheck object with given timeout

func (*HealthCheck) ServeHTTP

func (hc *HealthCheck) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler interface to provide a health-check endpoint

func (*HealthCheck) StartMonitoring

func (hc *HealthCheck) StartMonitoring()

StartMonitoring activates checks for autoscaler inactivity

func (*HealthCheck) UpdateLastActivity

func (hc *HealthCheck) UpdateLastActivity(timestamp time.Time)

UpdateLastActivity updates last time of activity

func (*HealthCheck) UpdateLastSuccessfulRun

func (hc *HealthCheck) UpdateLastSuccessfulRun(timestamp time.Time)

UpdateLastSuccessfulRun updates last time of successful (i.e. not ending in error) activity

type NodeScaleDownReason

type NodeScaleDownReason string

NodeScaleDownReason describes reason for removing node

const (

	// Underutilized node was removed because of low utilization
	Underutilized NodeScaleDownReason = "underutilized"
	// Empty node was removed
	Empty NodeScaleDownReason = "empty"
	// Unready node was removed
	Unready NodeScaleDownReason = "unready"
)

Jump to

Keyboard shortcuts

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