kloudlite

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Label

type Label string
const (
	KloudliteAccountName Label = "kl_account_name"
	KloudliteClusterName Label = "kl_cluster_name"
	KloudliteTrackingId  Label = "kl_tracking_id"

	NodeName Label = "node_name"

	NetworkInterface Label = "iface"

	PodNamespace Label = "pod_ns"
	PodName      Label = "pod_name"

	PVCNamespace Label = "pvc_ns"
	PVCName      Label = "pvc_name"
)

type MetricName

type MetricName string
const (
	NodeMemoryUsed      MetricName = "kl_node_mem_used"
	NodeMemoryAvailable MetricName = "kl_node_mem_avail"

	NodeCpuUtilization MetricName = "kl_node_cpu_utilization"
	NodeCpuUsage       MetricName = "kl_node_cpu_usage"

	NodeStorageUsed     MetricName = "kl_node_storage_used"
	NodeStorageAvail    MetricName = "kl_node_storage_avail"
	NodeStorageCapacity MetricName = "kl_node_storage_capacity"

	NodeNetworkRead        MetricName = "kl_node_network_read"
	NodeNetworkReadErrors  MetricName = "kl_node_network_read_errors"
	NodeNetworkWrite       MetricName = "kl_node_network_write"
	NodeNetworkWriteErrors MetricName = "kl_node_network_write_errors"

	PodMemoryUsed      MetricName = "kl_pod_mem_used"
	PodMemoryAvailable MetricName = "kl_pod_mem_avail"

	PodCpuUsage MetricName = "kl_pod_cpu_usage"

	PodPvcStorageUsed     MetricName = "kl_pod_pvc_storage_used"
	PodPvcStorageAvail    MetricName = "kl_pod_pvc_storage_avail"
	PodPvcStorageCapacity MetricName = "kl_pod_pvc_storage_capacity"

	PodNetworkRead        MetricName = "kl_pod_network_read"
	PodNetworkReadErrors  MetricName = "kl_pod_network_read_errors"
	PodNetworkWrite       MetricName = "kl_pod_network_write"
	PodNetworkWriteErrors MetricName = "kl_pod_network_write_errors"
)

type MetricsAggregator

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

func NewMetricsAggregator

func NewMetricsAggregator(ctx context.Context, kcli *k8s.Client, nodename string, extraTags map[string]string) (*MetricsAggregator, error)

func (*MetricsAggregator) WriteNodeMetrics

func (m *MetricsAggregator) WriteNodeMetrics(writer io.Writer) error

func (*MetricsAggregator) WritePodMetrics

func (m *MetricsAggregator) WritePodMetrics(writer io.Writer) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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