Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPUMetrics ¶
type CPUMetrics struct { Time time.Time `json:"time"` UsageNanoCores int64 `json:"usageNanoCores"` UsageCoreNanoSeconds int64 `json:"usageCoreNanoSeconds"` }
CPUMetrics represents the cpu usage data of a pod or node
type ContainerMetrics ¶
type ContainerMetrics struct { Name string `json:"name"` StartTime time.Time `json:"startTime"` CPU CPUMetrics `json:"cpu"` Memory MemoryMetrics `json:"memory"` RootFS FileSystemMetrics `json:"rootfs"` LogsFS FileSystemMetrics `json:"logs"` }
ContainerMetrics represents the metric data collect about a container from the kubelet
type FileSystemMetrics ¶
type FileSystemMetrics struct { AvailableBytes int64 `json:"availableBytes"` CapacityBytes int64 `json:"capacityBytes"` UsedBytes int64 `json:"usedBytes"` }
FileSystemMetrics represents disk usage metrics for a pod or node
type Kubernetes ¶
type Kubernetes struct { URL string `toml:"url"` BearerToken string `toml:"bearer_token"` BearerTokenString string `toml:"bearer_token_string" deprecated:"1.24.0;1.35.0;use 'BearerToken' with a file instead"` NodeMetricName string `toml:"node_metric_name"` LabelInclude []string `toml:"label_include"` LabelExclude []string `toml:"label_exclude"` ResponseTimeout config.Duration `toml:"response_timeout"` Log telegraf.Logger `toml:"-"` tls.ClientConfig // contains filtered or unexported fields }
Kubernetes represents the config object for the plugin
func (*Kubernetes) Gather ¶
func (k *Kubernetes) Gather(acc telegraf.Accumulator) error
Gather collects kubernetes metrics from a given URL
func (*Kubernetes) Init ¶
func (k *Kubernetes) Init() error
func (*Kubernetes) LoadJSON ¶ added in v1.18.0
func (k *Kubernetes) LoadJSON(url string, v interface{}) error
func (*Kubernetes) SampleConfig ¶
func (*Kubernetes) SampleConfig() string
type MemoryMetrics ¶
type MemoryMetrics struct { Time time.Time `json:"time"` AvailableBytes int64 `json:"availableBytes"` UsageBytes int64 `json:"usageBytes"` WorkingSetBytes int64 `json:"workingSetBytes"` RSSBytes int64 `json:"rssBytes"` PageFaults int64 `json:"pageFaults"` MajorPageFaults int64 `json:"majorPageFaults"` }
MemoryMetrics represents the memory metrics for a pod or node
type NetworkMetrics ¶
type NetworkMetrics struct { Time time.Time `json:"time"` RXBytes int64 `json:"rxBytes"` RXErrors int64 `json:"rxErrors"` TXBytes int64 `json:"txBytes"` TXErrors int64 `json:"txErrors"` }
NetworkMetrics represents network usage data for a pod or node
type NodeMetrics ¶
type NodeMetrics struct { NodeName string `json:"nodeName"` SystemContainers []ContainerMetrics `json:"systemContainers"` StartTime time.Time `json:"startTime"` CPU CPUMetrics `json:"cpu"` Memory MemoryMetrics `json:"memory"` Network NetworkMetrics `json:"network"` FileSystem FileSystemMetrics `json:"fs"` Runtime RuntimeMetrics `json:"runtime"` }
NodeMetrics represents detailed information about a node
type PodMetrics ¶
type PodMetrics struct { PodRef PodReference `json:"podRef"` StartTime *time.Time `json:"startTime"` Containers []ContainerMetrics `json:"containers"` Network NetworkMetrics `json:"network"` Volumes []VolumeMetrics `json:"volume"` }
PodMetrics contains metric data on a given pod
type PodReference ¶
PodReference is how a pod is identified
type RuntimeMetrics ¶
type RuntimeMetrics struct {
ImageFileSystem FileSystemMetrics `json:"imageFs"`
}
RuntimeMetrics contains metric data on the runtime of the system
type SummaryMetrics ¶
type SummaryMetrics struct { Node NodeMetrics `json:"node"` Pods []PodMetrics `json:"pods"` }
SummaryMetrics represents all the summary data about a particular node retrieved from a kubelet