k8sinfoanalyzer

package
v0.0.0-...-51da36d Latest Latest
Warning

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

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

README

K8sInfo Analyzer

K8sInfoAnalyzer is a component that analyzes k8s workload infomation received, receive model.DataGroup from metadata and send to exporter

Configuration

See config.go for the config specification.

Received Data (Input)

The DataGroup contains the following fields:

  • Name is always k8s_workload_metric_group.
  • Lables contains the following fields:
    • namespace: The namespace of the workload.
    • workload_name : The name of the workload.
    • workload_kind: The kind of the workload.
  • Metrics contains the following fields:
    • kindling_k8s_workload_info

An example is as follows.

{
  "Name": "k8s_workload_metric_group",
  "Metrics":{
    "kindling_k8s_workload_info": 1
  }
  "Labels": {
    "namespace": "kindling",
    "workload_kind": "Deployment",
    "workload_name": "testdemo1",
    }
}

Documentation

Index

Constants

View Source
const Type analyzer.Type = "k8sinfoanalyzer"

Variables

This section is empty.

Functions

func New

func New(cfg interface{}, telemetry *component.TelemetryTools, consumer []consumer.Consumer) analyzer.Analyzer

Types

type Config

type Config struct {
	// SendDataGroupInterval is the datagroup sending interval.
	// The unit is seconds.
	SendDataGroupInterval int `mapstructure:"send_datagroup_interval"`
}

func NewDefaultConfig

func NewDefaultConfig() *Config

type K8sInfoAnalyzer

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

func (*K8sInfoAnalyzer) ConsumableEvents

func (a *K8sInfoAnalyzer) ConsumableEvents() []string

func (*K8sInfoAnalyzer) ConsumeEvent

func (a *K8sInfoAnalyzer) ConsumeEvent(event *model.KindlingEvent) error

func (*K8sInfoAnalyzer) Shutdown

func (a *K8sInfoAnalyzer) Shutdown() error

func (*K8sInfoAnalyzer) Start

func (a *K8sInfoAnalyzer) Start() error

func (*K8sInfoAnalyzer) Type

func (a *K8sInfoAnalyzer) Type() analyzer.Type

Jump to

Keyboard shortcuts

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