clusterstatus

package
v4.2.720+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplicationName        influxdb.Tag   = "name"
	ApplicationNamespace   influxdb.Tag   = "namespace"
	ApplicationClusterName influxdb.Tag   = "cluster_name"
	ApplicationUid         influxdb.Tag   = "uid"
	ApplicationScalingTool influxdb.Tag   = "scaling_tool"
	ApplicationValue       influxdb.Field = "value"
)
View Source
const (
	ClusterName  influxdb.Tag   = "name"
	ClusterUid   influxdb.Tag   = "uid"
	ClusterValue influxdb.Field = "value"
)
View Source
const (
	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"
	ContainerTopControllerName        influxdb.Tag = "top_controller_name"
	ContainerTopControllerKind        influxdb.Tag = "top_controller_kind"
	ContainerAlamedaScalerName        influxdb.Tag = "alameda_scaler_name"
	ContainerAlamedaScalerScalingTool influxdb.Tag = "alameda_scaler_scaling_tool"

	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 (
	ControllerName                         influxdb.Tag   = "name"
	ControllerNamespace                    influxdb.Tag   = "namespace"
	ControllerClusterName                  influxdb.Tag   = "cluster_name"
	ControllerUid                          influxdb.Tag   = "uid"
	ControllerKind                         influxdb.Tag   = "kind"
	ControllerAlamedaSpecScalerName        influxdb.Tag   = "alameda_scaler_name"
	ControllerAlamedaSpecScalerScalingTool influxdb.Tag   = "alameda_scaler_scaling_tool"
	ControllerReplicas                     influxdb.Field = "replicas"
	ControllerSpecReplicas                 influxdb.Field = "spec_replicas"
	ControllerAlamedaSpecPolicy            influxdb.Field = "policy"
	ControllerAlamedaSpecEnableExecution   influxdb.Field = "enable_execution"
)
View Source
const (
	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"
	PodTopControllerName            influxdb.Tag = "top_controller_name"
	PodTopControllerKind            influxdb.Tag = "top_controller_kind"
	PodAlamedaSpecScalerName        influxdb.Tag = "alameda_scaler_name"
	PodAlamedaSpecScalerScalingTool influxdb.Tag = "alameda_scaler_scaling_tool"
	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"
)

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 {
	// InfluxDB tags
	Time        time.Time
	Name        string
	Namespace   string
	ClusterName string
	Uid         string
	ScalingTool string

	// InfluxDB fields
	Value string
}

func NewApplicationEntity

func NewApplicationEntity(data map[string]string) *ApplicationEntity

func (*ApplicationEntity) BuildInfluxPoint

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

type ClusterEntity

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

func NewClusterEntity

func NewClusterEntity(data map[string]string) *ClusterEntity

func (*ClusterEntity) BuildInfluxPoint

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

type ContainerEntity

type ContainerEntity struct {
	Time                     time.Time
	Name                     string
	PodName                  string
	Namespace                string
	NodeName                 string
	ClusterName              string
	Uid                      string
	TopControllerName        string
	TopControllerKind        string
	AlamedaScalerName        string
	AlamedaScalerScalingTool 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 (p *ContainerEntity) BuildInfluxPoint(measurement string) (*InfluxClient.Point, error)

type ControllerEntity

type ControllerEntity struct {
	// InfluxDB tags
	Time                   time.Time
	Name                   string
	Namespace              string
	ClusterName            string
	Uid                    string
	Kind                   string
	AlamedaSpecScalerName  string
	AlamedaSpecScalingTool string

	// InfluxDB fields
	Replicas                   int32
	SpecReplicas               int32
	AlamedaSpecPolicy          string
	AlamedaSpecEnableExecution string
}

func NewControllerEntity

func NewControllerEntity(data map[string]string) *ControllerEntity

func (*ControllerEntity) BuildInfluxPoint

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

type NamespaceEntity

type NamespaceEntity struct {
	// InfluxDB tags
	Time        time.Time
	Name        string
	ClusterName string
	Uid         string

	// InfluxDB fields
	Value string
}

func NewNamespaceEntity

func NewNamespaceEntity(data map[string]string) *NamespaceEntity

func (*NamespaceEntity) BuildInfluxPoint

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

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 (p *NodeEntity) BuildInfluxPoint(measurement string) (*InfluxClient.Point, error)

type PodEntity

type PodEntity struct {
	Time                         time.Time
	Name                         string
	Namespace                    string
	NodeName                     string
	ClusterName                  string
	Uid                          string
	TopControllerName            string
	TopControllerKind            string
	AlamedaSpecScalerName        string
	AlamedaSpecScalerScalingTool 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
}

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