Metris scrapes all Kyma clusters and uses Shoot information to generate metrics as event streams. The generated event streams are POST-ed to an events collecting system.
-
Metriscomes with the following command line argument flags:Flag Description Default Value gardener-secret-pathThe path to the secret which contains kubeconfig of the Gardener MPS cluster. /gardener/kubeconfiggardener-namespaceThe namespace in gardener cluster where information on Kyma clusters are. garden-kyma-devscrape-intervalThe wait duration of the interval between 2 executions of metrics generation. 3mworker-pool-sizeThe number of workers in the pool. 5log-levelThe log-level of the application. E.g. fatal, error, info, debug etc. infolisten-addrThe application starts server in this port to cater to the metrics and health endpoints. 8080debug-portThe custom port to debug when needed. 0will disable debugging server.0 -
Metriscomes with the following environment variables:Variable Description Default Value PUBLIC_CLOUD_SPECSThe specification contains the CPU, Network and Disk information for all machine types from a public cloud provider. -KEB_URLThe KEB URL where Metris fetches runtime information. -KEB_TIMEOUTThe timeout governs the connections from Metris to KEB 30sKEB_RETRY_COUNTThe number of retries Metris will do when connecting to KEB fails. 5 KEB_POLL_WAIT_DURATIONThe wait duration for Metris between each execution of polling KEB for runtime information. 10mEDP_URLThe EDP base URL where Metris will ingest event-stream to. -EDP_TOKENThe token used to connect to EDP. -EDP_NAMESPACEThe namespace in EDP where Metris will ingest event-stream to. kyma-devEDP_DATASTREAM_NAMEThe datastream in EDP where Metris will ingest event-stream to. consumption-metricsEDP_DATASTREAM_VERSIONThe datastream version which Metris will use. 1EDP_DATASTREAM_ENVThe datastream environment which Metris will use. devEDP_TIMEOUTThe timeout for Metris connections to EDP. 30sEDP_RETRYThe number of retries for Metris connections to EDP. 3
- Run a deployment in currently configured k8s cluster
ko apply -f dev/
- Resolve all dependencies
make gomod-vendor
- Run tests
make tests
- Run tests and publish a test coverage report
make publish-test-results
- Check logs
kubectl logs -l app=metrisv2 -n kcp-system -c metrisv2 -f