kymastatsreceiver

package module
v0.0.0-...-64f357c Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

README

Kyma Stats Receiver

Status
stability alpha: metrics
Code Owners kyma-project/observability

The Kyma Stats Receiver pulls Kyma resources from the API server, creates status metrics, and sends them down the metric pipeline for further processing.

Metrics

For details about the metrics produced by the Kyma Stats Receiver, see metadata.yaml and documentation.md

Configuration

The following settings are required:

  • auth_type (default = serviceAccount): Specifies the authentication method for accessing the Kubernetes API server. Options include none (no authentication), serviceAccount (uses the default service account token assigned to the Pod), or kubeConfig (uses credentials from ~/.kube/config).
  • resources: A list of API group-version-resources of Kyma resources. Status metrics are generated for each group-version-resource.

The following settings are optional:

  • collection_interval (default = 60s): The Kyma Stats Receiver monitors Kyma custom resources using the Kubernetes API. It emits the collected metrics only once per collection interval. The collection_interval setting determines how frequently these metrics are emitted.
  • metrics: Enables or disables specific metrics.
  • resource_attributes: Enables or disables resource attributes.

Example:

  kymastats:
    auth_type: seviceAccount
    collection_interval: 30s
    metrics:
      kyma.resource.status.state:
        enabled: true
      kyma.resource.status.conditions:
        enabled: true
    resources:
    - group: operator.kyma-project.io
      version: v1alpha1
      resource: telemetries
    resource_attributes:
      k8s.namespace.name:
        enabled: true
      k8s.resource.name:
        enabled: true

For the full list of settings exposed for the Kyma Stats Receiver, see the config.go file. For detailed sample configurations , see the config.yaml file.

Documentation

Overview

Package kymastatsreceiver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

NewFactory creates a factory for receiver.

Types

type Config

type Config struct {
	k8sconfig.APIConfig            `mapstructure:",squash"`
	scraperhelper.ControllerConfig `mapstructure:",squash"`
	metadata.MetricsBuilderConfig  `mapstructure:",squash"`
	Resources                      []ResourceConfig `mapstructure:"resources"`
	// contains filtered or unexported fields
}

Config represents the receiver config settings within the collector's config.yaml

func (*Config) Validate

func (cfg *Config) Validate() error

type ResourceConfig

type ResourceConfig struct {
	Group    string `mapstructure:"group"`
	Version  string `mapstructure:"version"`
	Resource string `mapstructure:"resource"`
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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