Versions in this module Expand all Collapse all v1 v1.5.0 Sep 23, 2019 Changes in this version + const ContainerLimitsCpuHelp + const ContainerLimitsCpuName + const ContainerLimitsMemoryHelp + const ContainerLimitsMemoryName + const ContainerRequestsCpuHelp + const ContainerRequestsCpuName + const ContainerRequestsMemoryHelp + const ContainerRequestsMemoryName + const ContainerTag + const InstanceGroupTag + const InstanceGroupsHelp + const InstanceGroupsName + const NamespaceTag + const NodeAllocatableCpuHelp + const NodeAllocatableCpuName + const NodeAllocatableMemoryHelp + const NodeAllocatableMemoryName + const NodeAllocatablePodsHelp + const NodeAllocatablePodsName + const NodeCapacityCpuHelp + const NodeCapacityCpuName + const NodeCapacityMemoryHelp + const NodeCapacityMemoryName + const NodeCapacityPodsHelp + const NodeCapacityPodsName + const NodeTag + const NodesCountHelp + const NodesCountName + const PodTag + const TypeCluster + const TypeNode + const TypePod + const TypePodContainer + const TypeSysContainer + var TypeGAUGE = io_prometheus_client.MetricType_GAUGE.String() + func InitMetrics(client *client.Client, scanner *scanner.Scanner, kube *kuber.Kube, ...) error + func ParseResponse(allowedMetrics map[string]struct{}, resp *http.Response, ...) error + func ReadPrometheusMetrics(allowedMetrics map[string]struct{}, resp *http.Response, bind BindFunc) (result map[string]*MetricFamily, err error) + type BindFunc func(labels map[string]string) (entities *Entities, tags map[string]string) + type CAdvisor struct + func NewCAdvisor(kubeletClient *KubeletClient, logger *log.Logger, scanner *scanner.Scanner, ...) (*CAdvisor, error) + func (cAdvisor *CAdvisor) GetMetrics(tickTime time.Time) (chan *MetricsBatch, error) + type CAdvisorMetrics map[string][]TagsValue + type Entities struct + Application *uuid.UUID + Container *uuid.UUID + Node *uuid.UUID + Service *uuid.UUID + type Kubelet struct + func NewKubelet(kubeletClient *KubeletClient, log *log.Logger, resolution time.Duration, ...) (*Kubelet, error) + func (kubelet *Kubelet) GetMetrics(scanner *scanner.Scanner, tickTime time.Time) ([]*Metrics, map[string]interface{}, error) + type KubeletClient struct + func NewKubeletClient(logger *log.Logger, scanner *scanner.Scanner, kube *kuber.Kube, ...) (*KubeletClient, error) + func (client *KubeletClient) Get(node *kuber.Node, path string) (*http.Response, error) + func (client *KubeletClient) GetBytes(node *kuber.Node, path string) ([]byte, error) + func (client *KubeletClient) GetJson(node *kuber.Node, path string, response interface{}) error + type KubeletSummary struct + Node struct{ ... } + Pods []struct{ ... } + type KubeletSummaryContainer struct + CPU struct{ ... } + Memory struct{ ... } + Name string + RootFS struct{ ... } + StartTime time.Time + type KubeletValue struct + Timestamp time.Time + Value int64 + type MetricFamily struct + Help string + Name string + Tags []string + Type string + Values []*MetricValue + type MetricValue struct + Tags map[string]string + Value float64 + type Metrics struct + AdditionalTags map[string]interface{} + Application uuid.UUID + Container uuid.UUID + Name string + Node uuid.UUID + PodName string + Service uuid.UUID + Timestamp time.Time + Type string + Value int64 + type MetricsBatch struct + Metrics map[string]*MetricFamily + Timestamp time.Time + type MetricsSource interface + GetMetrics func(scanner *scanner.Scanner, tickTime time.Time) ([]*Metrics, map[string]interface{}, error) + type NodePathGetter func(node *kuber.Node, path_ string) string + type Prometheus struct + type RawMetric struct + Account uuid.UUID + Application *uuid.UUID + Cluster uuid.UUID + Container *uuid.UUID + Metric string + Node uuid.UUID + Service *uuid.UUID + Tags map[string]string + Timestamp time.Time + Value float64 + type RawMetrics []*RawMetric + type Source interface + GetMetrics func(time time.Time) (chan *MetricsBatch, error) + type Stats struct + func NewStats(s *scanner.Scanner, logger *log.Logger) *Stats + func (stats *Stats) GetMetrics(tickTime time.Time) (chan *MetricsBatch, error) + type TagsValue struct + Tags map[string]string + Value float64 Other modules containing this package github.com/MagalixCorp/magalix-agent/v2 github.com/MagalixCorp/magalix-agent/v3