Categorygithub.com/kyma-project/kyma-metrics-collector
module
0.0.0-20241219151713-82e168f5dbf5
Repository: https://github.com/kyma-project/kyma-metrics-collector.git
Documentation: pkg.go.dev

# README

Kyma Metrics Collector

Status

REUSE status

GitHub tag checks state

Overview

Kyma Metrics Collector (KMC) is a component that scrapes all Kyma clusters to generate metrics. These metrics are sent to an SAP-internal tool called Event Data Platform (EDP) as an event stream and used for billing information.

Learn more about functionality and architecture in the Contributor README.

Usage

Flags

Kyma Metrics Collector comes with the following command line argument flags:

FlagDescriptionDefault Value
scrape-intervalThe time interval to wait between 2 executions of metrics generation.3m
worker-pool-sizeThe number of workers in the pool.5
log-levelThe log-level of the Application. For example, fatal, error, info, debug.info
listen-addrThe Application starts the server in this port to cater to the metrics and health endpoints.8080
debug-portThe custom port to debug when needed. 0 will disable the debugging server.0

Environment variables

Kyma Metrics Collector comes with the following environment variables:

VariableDescriptionDefault Value
PUBLIC_CLOUD_SPECSThis specification contains the CPU, Network and Disk information for all machine types from a public cloud provider.-
KEB_URLThe KEB URL where Kyma Metrics Collector fetches runtime information.-
KEB_TIMEOUTThis timeout governs the connections from Kyma Metrics Collector to KEB30s
KEB_RETRY_COUNTThe number of retries Kyma Metrics Collector will do when connecting to KEB fails.5
KEB_POLL_WAIT_DURATIONThe time interval for Kyma Metrics Collector to wait between each execution of polling KEB for runtime information.10m
EDP_URLThe EDP base URL where Kyma Metrics Collector will ingest the event-stream to.-
EDP_TOKENThe token used to connect to EDP.-
EDP_NAMESPACEThe namespace in EDP where Kyma Metrics Collector will ingest the event-stream to.kyma-dev
EDP_DATASTREAM_NAMEThe datastream in EDP where Kyma Metrics Collector will ingest the event-stream to.consumption-metrics
EDP_DATASTREAM_VERSIONThe datastream version which Kyma Metrics Collector will use.1
EDP_DATASTREAM_ENVThe datastream environment which Kyma Metrics Collector will use.dev
EDP_TIMEOUTThe timeout for Kyma Metrics Collector connections to EDP.30s
EDP_RETRYThe number of retries for Kyma Metrics Collector connections to EDP.3

Development

  • Run a deployment in a currently configured k8s cluster:

    NOTE: In order to do this, you need a token from a secret kcp-kyma-metrics-collector.

    ko apply -f dev/
    
  • Run tests:

    make test
    

Troubleshooting

  • Check logs:
    kubectl logs -f -n kcp-system $(kubectl get po -n kcp-system -l 'app=kmc-dev' -oname) kmc-dev
    

Contributing

See the Contributing Rules.

Code of Conduct

See the Code of Conduct document.

Licensing

See the license file.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author