Documentation ¶
Index ¶
Constants ¶
View Source
const ( ApplicationTime influxdb.Tag = "time" ApplicationName influxdb.Tag = "name" ApplicationNamespace influxdb.Tag = "namespace" ApplicationClusterName influxdb.Tag = "cluster_name" ApplicationUid influxdb.Tag = "uid" ApplicationAlamedaSpecScalingTool influxdb.Field = "spec_scaling_tool" )
View Source
const ( ClusterTime influxdb.Tag = "time" ClusterName influxdb.Tag = "name" ClusterUid influxdb.Tag = "uid" ClusterValue influxdb.Field = "value" )
View Source
const ( ContainerTime influxdb.Tag = "time" ContainerName influxdb.Tag = "name" ContainerPodName influxdb.Tag = "pod_name" ContainerNamespace influxdb.Tag = "namespace" ContainerNodeName influxdb.Tag = "node_name" ContainerClusterName influxdb.Tag = "cluster_name" ContainerUid influxdb.Tag = "uid" ContainerResourceRequestCPU influxdb.Field = "resource_request_cpu" ContainerResourceRequestMemory influxdb.Field = "resource_request_memory" ContainerResourceLimitCPU influxdb.Field = "resource_limit_cpu" ContainerResourceLimitMemory influxdb.Field = "resource_limit_memory" ContainerStatusWaitingReason influxdb.Field = "status_waiting_reason" ContainerStatusWaitingMessage influxdb.Field = "status_waiting_message" ContainerStatusRunningStartedAt influxdb.Field = "status_running_start_at" ContainerStatusTerminatedExitCode influxdb.Field = "status_terminated_exit_code" ContainerStatusTerminatedReason influxdb.Field = "status_terminated_reason" ContainerStatusTerminatedMessage influxdb.Field = "status_terminated_message" ContainerStatusTerminatedStartedAt influxdb.Field = "status_terminated_started_at" ContainerStatusTerminatedFinishedAt influxdb.Field = "status_terminated_finished_at" ContainerLastTerminationWaitingReason influxdb.Field = "last_termination_status_waiting_reason" ContainerLastTerminationWaitingMessage influxdb.Field = "last_termination_status_waiting_message" ContainerLastTerminationRunningStartedAt influxdb.Field = "last_termination_status_running_start_at" ContainerLastTerminationTerminatedExitCode influxdb.Field = "last_termination_status_terminated_exit_code" ContainerLastTerminationTerminatedReason influxdb.Field = "last_termination_status_terminated_reason" ContainerLastTerminationTerminatedMessage influxdb.Field = "last_termination_status_terminated_message" ContainerLastTerminationTerminatedStartedAt influxdb.Field = "last_termination_status_terminated_started_at" ContainerLastTerminationTerminatedFinishedAt influxdb.Field = "last_termination_status_terminated_finished_at" ContainerRestartCount influxdb.Field = "restart_count" )
View Source
const ( ControllerTime influxdb.Tag = "time" ControllerName influxdb.Tag = "name" ControllerNamespace influxdb.Tag = "namespace" ControllerClusterName influxdb.Tag = "cluster_name" ControllerUid influxdb.Tag = "uid" ControllerAlamedaSpecScalerName influxdb.Tag = "spec_name" ControllerAlamedaSpecScalerNamespace influxdb.Tag = "spec_namespace" ControllerKind influxdb.Field = "kind" ControllerReplicas influxdb.Field = "replicas" ControllerSpecReplicas influxdb.Field = "spec_replicas" ControllerAlamedaSpecScalingTool influxdb.Field = "spec_scaling_tool" ControllerAlamedaSpecPolicy influxdb.Field = "policy" ControllerAlamedaSpecEnableExecution influxdb.Field = "enable_execution" )
View Source
const ( NamespaceTime influxdb.Tag = "time" NamespaceName influxdb.Tag = "name" NamespaceClusterName influxdb.Tag = "cluster_name" NamespaceUid influxdb.Tag = "uid" NamespaceValue influxdb.Field = "value" )
View Source
const ( NodeName influxdb.Tag = "name" // NodeName is the name of node NodeClusterName influxdb.Tag = "cluster_name" NodeUid influxdb.Tag = "uid" NodeCreateTime influxdb.Field = "create_time" NodeCPUCores influxdb.Field = "node_cpu_cores" // NodeCPUCores is the amount of cores in node NodeMemoryBytes influxdb.Field = "node_memory_bytes" // NodeMemoryBytes is the amount of memory bytes in node NodeNetworkMbps influxdb.Field = "node_network_mbps" // NodeNetworkMbps is mega bits per second NodeIOProvider influxdb.Field = "io_provider" // Cloud service provider NodeIOInstanceType influxdb.Field = "io_instance_type" NodeIORegion influxdb.Field = "io_region" NodeIOZone influxdb.Field = "io_zone" NodeIOOS influxdb.Field = "io_os" NodeIORole influxdb.Field = "io_role" NodeIOInstanceID influxdb.Field = "io_instance_id" NodeIOStorageSize influxdb.Field = "io_storage_size" )
View Source
const ( PodName influxdb.Tag = "name" PodNamespace influxdb.Tag = "namespace" PodNodeName influxdb.Tag = "node_name" PodClusterName influxdb.Tag = "cluster_name" PodUid influxdb.Tag = "uid" PodAlamedaSpecScalerName influxdb.Tag = "alameda_scaler_name" PodAlamedaSpecScalerNamespace influxdb.Tag = "alameda_scaler_namespace" PodAlamedaSpecScalerClusterName influxdb.Tag = "alameda_scaler_cluster_name" PodAppName influxdb.Tag = "app_name" PodAppPartOf influxdb.Tag = "app_part_of" PodCreateTime influxdb.Field = "pod_create_time" PodResourceLink influxdb.Field = "resource_link" PodTopControllerName influxdb.Field = "top_controller_name" PodTopControllerKind influxdb.Field = "top_controller_kind" PodTopControllerReplicas influxdb.Field = "top_controller_replicas" PodStatusPhase influxdb.Field = "pod_phase" PodStatusMessage influxdb.Field = "pod_message" PodStatusReason influxdb.Field = "pod_reason" PodAlamedaSpecPolicy influxdb.Field = "policy" PodAlamedaSpecUsedRecommendationID influxdb.Field = "used_recommendation_id" PodAlamedaSpecResourceLimitCPU influxdb.Field = "alameda_scaler_resource_limit_cpu" PodAlamedaSpecResourceLimitMemory influxdb.Field = "alameda_scaler_resource_limit_memory" PodAlamedaSpecResourceRequestCPU influxdb.Field = "alameda_scaler_resource_request_cpu" PodAlamedaSpecResourceRequestMemory influxdb.Field = "alameda_scaler_resource_request_memory" PodAlamedaSpecScalingTool influxdb.Field = "scaling_tool" )
Variables ¶
View Source
var ( ApplicationTags = []influxdb.Tag{ ApplicationName, ApplicationNamespace, ApplicationClusterName, ApplicationUid, } ApplicationFields = []influxdb.Field{ ApplicationAlamedaSpecScalingTool, } ApplicationColumns = []string{ string(ApplicationName), string(ApplicationNamespace), string(ApplicationClusterName), string(ApplicationUid), string(ApplicationAlamedaSpecScalingTool), } )
View Source
var ( ClusterTags = []influxdb.Tag{ ClusterName, ClusterUid, } ClusterFields = []influxdb.Field{ ClusterValue, } ClusterColumns = []string{ string(ClusterName), string(ClusterUid), string(ClusterValue), } )
View Source
var ( // ContainerTags is the list of container measurement tags ContainerTags = []influxdb.Tag{ ContainerTime, ContainerName, ContainerPodName, ContainerNamespace, ContainerNodeName, ContainerClusterName, ContainerUid, } // ContainerFields is the list of container measurement fields ContainerFields = []influxdb.Field{ ContainerResourceRequestCPU, ContainerResourceRequestMemory, ContainerResourceLimitCPU, ContainerResourceLimitMemory, ContainerStatusWaitingReason, ContainerStatusWaitingMessage, ContainerStatusRunningStartedAt, ContainerStatusTerminatedExitCode, ContainerStatusTerminatedReason, ContainerStatusTerminatedMessage, ContainerStatusTerminatedStartedAt, ContainerStatusTerminatedFinishedAt, ContainerLastTerminationWaitingReason, ContainerLastTerminationWaitingMessage, ContainerLastTerminationRunningStartedAt, ContainerLastTerminationTerminatedExitCode, ContainerLastTerminationTerminatedReason, ContainerLastTerminationTerminatedMessage, ContainerLastTerminationTerminatedStartedAt, ContainerLastTerminationTerminatedFinishedAt, ContainerRestartCount, } )
View Source
var ( // ControllerTags is list of tags of alameda_controller_recommendation measurement ControllerTags = []influxdb.Tag{ ControllerTime, ControllerName, ControllerNamespace, ControllerClusterName, ControllerUid, ControllerAlamedaSpecScalerName, ControllerAlamedaSpecScalerNamespace, } // ControllerFields is list of fields of alameda_controller_recommendation measurement ControllerFields = []influxdb.Field{ ControllerKind, ControllerReplicas, ControllerSpecReplicas, ControllerAlamedaSpecScalingTool, ControllerAlamedaSpecPolicy, ControllerAlamedaSpecEnableExecution, } ControllerColumns = []string{ string(ControllerTime), string(ControllerName), string(ControllerNamespace), string(ControllerClusterName), string(ControllerUid), string(ControllerAlamedaSpecScalerName), string(ControllerAlamedaSpecScalerNamespace), string(ControllerKind), string(ControllerReplicas), string(ControllerSpecReplicas), string(ControllerAlamedaSpecScalingTool), string(ControllerAlamedaSpecPolicy), string(ControllerAlamedaSpecEnableExecution), } )
View Source
var ( NamespaceTags = []influxdb.Tag{ NamespaceName, NamespaceClusterName, NamespaceUid, } NamespaceFields = []influxdb.Field{ NamespaceValue, } NamespaceColumns = []string{ string(NamespaceName), string(NamespaceClusterName), string(NamespaceUid), string(NamespaceValue), } )
View Source
var ( // NodeTags list tags of node measurement NodeTags = []influxdb.Tag{ NodeName, NodeClusterName, NodeUid, } // NodeFields list fields of node measurement NodeFields = []influxdb.Field{ NodeCreateTime, NodeCPUCores, NodeMemoryBytes, NodeNetworkMbps, NodeIOProvider, NodeIOInstanceType, NodeIORegion, NodeIOZone, NodeIOOS, NodeIORole, NodeIOInstanceID, NodeIOStorageSize, } )
View Source
var ( PodTags = []influxdb.Tag{ PodName, PodNamespace, PodNodeName, PodClusterName, PodUid, PodAlamedaSpecScalerName, PodAlamedaSpecScalerNamespace, PodAlamedaSpecScalerClusterName, PodAppName, PodAppPartOf, } PodFields = []influxdb.Field{ PodCreateTime, PodResourceLink, PodTopControllerName, PodTopControllerKind, PodTopControllerReplicas, PodStatusPhase, PodStatusMessage, PodStatusReason, PodAlamedaSpecPolicy, PodAlamedaSpecUsedRecommendationID, PodAlamedaSpecResourceLimitCPU, PodAlamedaSpecResourceLimitMemory, PodAlamedaSpecResourceRequestCPU, PodAlamedaSpecResourceRequestMemory, PodAlamedaSpecScalingTool, } )
Functions ¶
This section is empty.
Types ¶
type ApplicationEntity ¶
type ContainerEntity ¶
type ContainerEntity struct { Time time.Time Name string PodName string Namespace string NodeName string ClusterName string Uid string ResourceRequestCPU string // TODO: check if type string or float64 ResourceRequestMemory string // TODO: check if type string or float64 ResourceLimitCPU string // TODO: check if type string or float64 ResourceLimitMemory string // TODO: check if type string or float64 StatusWaitingReason string StatusWaitingMessage string StatusRunningStartedAt int64 StatusTerminatedExitCode int32 StatusTerminatedReason string StatusTerminatedMessage string StatusTerminatedStartedAt int64 StatusTerminatedFinishedAt int64 LastTerminationWaitingReason string LastTerminationWaitingMessage string LastTerminationRunningStartedAt int64 LastTerminationTerminatedExitCode int32 LastTerminationTerminatedReason string LastTerminationTerminatedMessage string LastTerminationTerminatedStartedAt int64 LastTerminationTerminatedFinishedAt int64 RestartCount int32 }
ContainerEntity Entity in database
func NewContainerEntity ¶
func NewContainerEntity(data map[string]string) *ContainerEntity
NewContainerEntityFromMap Build entity from map
func (*ContainerEntity) BuildInfluxPoint ¶
func (e *ContainerEntity) BuildInfluxPoint(measurement string) (*InfluxClient.Point, error)
type NamespaceEntity ¶
type NodeEntity ¶
type NodeEntity struct { Time time.Time Name string ClusterName string Uid string CreateTime int64 CPUCores int64 MemoryBytes int64 NetworkMbps int64 IOProvider string IOInstanceType string IORegion string IOZone string IOOS string IORole string IOInstanceID string IOStorageSize int64 }
NodeEntity is entity in database
func NewNodeEntity ¶
func NewNodeEntity(data map[string]string) NodeEntity
NewNodeEntityFromMap Build entity from map
func (*NodeEntity) BuildInfluxPoint ¶
func (e *NodeEntity) BuildInfluxPoint(measurement string) (*InfluxClient.Point, error)
func (*NodeEntity) BuildNode ¶
func (e *NodeEntity) BuildNode() *ApiResources.Node
type PodEntity ¶
type PodEntity struct { Time time.Time Name string Namespace string NodeName string ClusterName string Uid string AlamedaSpecScalerName string AlamedaSpecScalerNamespace string AlamedaSpecScalerClusterName string AppName string AppPartOf string CreateTime int64 ResourceLink string TopControllerName string TopControllerKind string TopControllerReplicas int32 StatusPhase string StatusMessage string StatusReason string AlamedaSpecPolicy string AlamedaSpecUsedRecommendationID string AlamedaSpecResourceLimitCPU string // TODO: check if type string or float64 AlamedaSpecResourceLimitMemory string // TODO: check if type string or float64 AlamedaSpecResourceRequestCPU string // TODO: check if type string or float64 AlamedaSpecResourceRequestMemory string // TODO: check if type string or float64 AlamedaSpecScalingTool string }
func NewPodEntity ¶
func (*PodEntity) BuildInfluxPoint ¶
func (p *PodEntity) BuildInfluxPoint(measurement string) (*InfluxClient.Point, error)
Click to show internal directories.
Click to hide internal directories.