clusterstatus

package
v4.2.528+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

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"
	ControllerKind                       influxdb.Tag   = "kind"
	ControllerAlamedaSpecScalerName      influxdb.Tag   = "spec_name"
	ControllerAlamedaSpecScalerNamespace influxdb.Tag   = "spec_namespace"
	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"
	PodTopControllerName            influxdb.Tag = "top_controller_name"
	PodTopControllerKind            influxdb.Tag = "top_controller_kind"
	PodAppName                      influxdb.Tag = "app_name"
	PodAppPartOf                    influxdb.Tag = "app_part_of"

	PodCreateTime                       influxdb.Field = "pod_create_time"
	PodResourceLink                     influxdb.Field = "resource_link"
	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 (
	ClusterTags = []influxdb.Tag{
		ClusterName,
		ClusterUid,
	}

	ClusterFields = []influxdb.Field{
		ClusterValue,
	}

	ClusterColumns = []string{
		string(ClusterName),
		string(ClusterUid),
		string(ClusterValue),
	}
)
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,
	}
)

Functions

This section is empty.

Types

type ApplicationEntity

type ApplicationEntity struct {
	Time                   time.Time
	Name                   *string
	Namespace              *string
	ClusterName            *string
	Uid                    *string
	AlamedaSpecScalingTool *string
}

type ClusterEntity

type ClusterEntity struct {
	Time time.Time
	Name *string
	Uid  *string
}

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 NamespaceEntity struct {
	Time        time.Time
	Name        *string
	Namespace   *string
	NodeName    *string
	ClusterName *string
	Uid         *string
}

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
	TopControllerName            string
	TopControllerKind            string
	AppName                      string
	AppPartOf                    string

	CreateTime                       int64
	ResourceLink                     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 NewPodEntity(data map[string]string) *PodEntity

func (*PodEntity) BuildInfluxPoint

func (p *PodEntity) BuildInfluxPoint(measurement string) (*InfluxClient.Point, error)

Jump to

Keyboard shortcuts

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