Configuration Architecture
The agent’s configuration consists of three main components:Agent Configuration
Controls agent behavior, update intervals, and service settings
Collector Configuration
OpenTelemetry collector pipeline configuration (receivers, processors, exporters)
Remote Updates
Dynamic configuration updates from KloudMate platform
Configuration Hierarchy
The agent resolves configuration in the following order (highest to lowest priority):Agent Config File
YAML file specified via
--agent-config flag or KM_AGENT_CONFIG environment variableRemote Configuration
Configuration fetched from KloudMate platform (updates collector config dynamically)
Configuration File Locations
Default configuration paths vary by deployment mode and operating system:Host Deployment
Docker Deployment
Kubernetes Deployment
Configuration Files
The agent uses different default configurations based on the deployment mode:Host Mode
host-col-config.yaml - Optimized for bare metal and VM deploymentsDocker Mode
docker-col-config.yaml - Includes Docker stats receiver and container log collectionKubernetes Mode
daemonset-col-config.yaml - Node-level monitoring with kubelet statsKey Configuration Parameters
Authentication & Connectivity
API key for authenticating with the KloudMate platform. Obtain from Settings.
OTLP/HTTP endpoint where telemetry data is sent.
Update Configuration
Interval in seconds between configuration update checks.
Endpoint for fetching configuration updates. Auto-derived from collector endpoint if not set.
Deployment Mode
Enable Docker-specific configuration and receivers.
Kubernetes cluster name (required for Kubernetes deployments).
Configuration Validation
The agent validates configuration on startup:Environment Variable Expansion
Configuration files support environment variable expansion using the${env:VAR_NAME} syntax:
Environment variables are expanded by the OpenTelemetry Collector at startup. If a variable is not set, the collector will fail to start.
Configuration Best Practices
Use Environment Variables for Secrets
Use Environment Variables for Secrets
Never hardcode API keys or sensitive credentials in configuration files. Always use environment variable expansion:
Leverage Remote Configuration
Leverage Remote Configuration
Use the remote configuration feature to manage collector pipelines centrally:
- Reduces manual configuration management
- Enables dynamic updates without agent restarts
- Supports A/B testing and gradual rollouts
Monitor Configuration Updates
Monitor Configuration Updates
Track configuration changes through agent logs:
Test Configuration Changes
Test Configuration Changes
Validate configuration files before deploying:
Next Steps
Environment Variables
Complete reference of all environment variables
Remote Configuration
Learn how dynamic updates work
OpenTelemetry Components
Configure receivers, processors, and exporters
Troubleshooting
Resolve configuration issues