KM_. This reference documents all available variables organized by category.
Core Configuration
Authentication & Connectivity
Required. API key for authenticating with the KloudMate platform.Obtain your API key from the KloudMate Settings page.Used in:
- Authentication header for telemetry export
- Configuration update requests
- Agent registration
/home/daytona/workspace/source/cmd/kmagent/main.go:199-203OTLP/HTTP endpoint where the agent sends telemetry data.Format: Must be a valid HTTPS URL with portRegional endpoints:
- US:
https://otel.kloudmate.com:4318 - EU:
https://otel.eu.kloudmate.com:4318 - Custom: Your self-hosted endpoint
/home/daytona/workspace/source/cmd/kmagent/main.go:191-197Configuration Files
Path to the agent configuration file (YAML format).Default paths:
- Linux:
/etc/kmagent/config.yaml - macOS:
/Library/Application Support/kmagent/config.yaml - Windows:
%ProgramFiles%\kmagent\config.yaml - Docker:
/etc/kmagent/config.yaml
/home/daytona/workspace/source/cmd/kmagent/main.go:180-184Path to the OpenTelemetry Collector configuration file (YAML format).This configuration defines the collector’s receivers, processors, and exporters.Source reference:
/home/daytona/workspace/source/cmd/kmagent/main.go:186-190Remote Configuration
Interval in seconds between configuration update checks.Valid values:
0: Disable remote configuration updates10-300: Recommended range (seconds)> 300: Use for reduced API calls
/home/daytona/workspace/source/cmd/kmagent/main.go:204-210API endpoint for fetching configuration updates.If not set, automatically derived from
KM_COLLECTOR_ENDPOINT:- Collector:
https://otel.kloudmate.com:4318 - Update:
https://api.kloudmate.com/agents/config-check
/home/daytona/workspace/source/cmd/kmagent/main.go:211-217Deployment Mode
Enable Docker-specific configuration and receivers.When enabled:
- Uses
/home/daytona/workspace/source/configs/docker-col-config.yaml - Enables
docker_statsreceiver - Mounts
/var/run/docker.sock - Collects container logs from
/var/lib/docker/containers
/home/daytona/workspace/source/cmd/kmagent/main.go:218-223Docker daemon socket endpoint.Source reference:
/home/daytona/workspace/source/cmd/kmagent/main.go:224-229Kubernetes Configuration
Cluster Identification
Required for Kubernetes. Name of the Kubernetes cluster.Applied as
k8s.cluster.name attribute to all telemetry data.Source reference: /home/daytona/workspace/source/configs/daemonset-col-config.yaml:13,22,52,76,84,162,170Required for DaemonSet. Name of the Kubernetes node where the agent is running.Typically set automatically via the Downward API:Used for:
- Filtering metrics to specific node
- Node-level resource attribution
- Kubelet stats collection
/home/daytona/workspace/source/configs/daemonset-col-config.yaml:84,167,175,514Host IP address of the Kubernetes node.
Feature Toggles
Enable log collection from Kubernetes pods.When enabled:
filelog/containersreceiver activated- Collects logs from
/var/log/pods/*/*/*.log - Parses JSON and plaintext logs
- Extracts trace context
/home/daytona/workspace/source/internal/updater/k8s_updater.go:88-95Enable automatic application instrumentation for distributed tracing.Supported languages:
- Java
- Node.js
- Python
- .NET
/home/daytona/workspace/source/internal/updater/k8s_updater.go:98-105Comma-separated list of Kubernetes namespaces to monitor.Source reference:
/home/daytona/workspace/source/internal/updater/k8s_updater.go:79Operator Configuration
Namespace where the KloudMate agent is deployed.Source reference:
/home/daytona/workspace/source/internal/instrumentation/autoinstrument.go:13Name of the Instrumentation CustomResourceDefinition.Source reference:
/home/daytona/workspace/source/internal/instrumentation/autoinstrument.go:17Name of the agent DaemonSet.
Name of the agent Deployment.
RPC Configuration
Port for the configuration updater RPC server.Used for communication between the config updater and agent pods in Kubernetes.Source reference:
/home/daytona/workspace/source/rpc/server.go:24Log Filtering
Additional log paths to exclude from collection.In Helm values:Source reference:
/home/daytona/workspace/source/configs/daemonset-col-config.yaml:252Additional file log paths to include (Docker mode).Source reference:
/home/daytona/workspace/source/configs/docker-col-config.yaml:7Logging & Debugging
Agent log level.Valid values:Source reference:
trace: Most verbose, includes all debug messagesdebug: Detailed debugging informationinfo: General informational messages (default)warn: Warning messages onlyerror: Error messages onlyfatal: Fatal errors only
/home/daytona/workspace/source/internal/logger/level.go:10-14Agent version identifier. Automatically set by the agent at startup.Used for:
- Version reporting to platform
- Update compatibility checks
- Troubleshooting and support
/home/daytona/workspace/source/internal/k8sagent/agent.go:172Environment Variable Expansion
All OpenTelemetry Collector configuration files support environment variable expansion using the${env:VAR_NAME} syntax:
Configuration Examples
Host Deployment (Linux)
Docker Deployment
Kubernetes Deployment
Validation
The agent validates required environment variables on startup:/home/daytona/workspace/source/internal/k8sagent/agent.go:146-149
Troubleshooting
Missing Required Variables
Missing Required Variables
Invalid Endpoint Format
Invalid Endpoint Format
Environment Variable Not Expanded
Environment Variable Not Expanded
Next Steps
Configuration Overview
Learn about the configuration architecture
Remote Configuration
Dynamic configuration updates
OpenTelemetry Components
Configure receivers, processors, and exporters
Installation
Install the agent on your platform