📦 Recommended Setup: Remote Configuration
✨ Why Remote Config?
Instead of managing static configuration files, use Telegraf's remote_config_url feature to:
- 🔄 Update configurations centrally without redeploying
- 🎯 Automatically inject correct cluster and environment settings
- 🔒 Ensure all instances use authenticated, validated configurations
- ⚡ Reduce configuration drift across your fleet
Generate your systemd service unit and environment file below. These two files configure Telegraf to fetch its configuration remotely on startup.
🔧 Generate Configuration Files
Download Systemd Service Units (by node type):
Download Environment File (shared across all nodes):
The environment file is the same for all node types in your cluster📋 Installation Steps
1️⃣ Download Files
Download the systemd service files for each node type you need, plus one shared environment file.
2️⃣ Install Files
Copy files to your servers:
/etc/systemd/system/insights-{data|meta|kapa}.service
/etc/default/insights (shared by all)
Service names vary by node type; environment file is the same
3️⃣ Enable & Start
Run: systemctl daemon-reload
systemctl enable --now insights-data
Replace 'data' with your node type
chmod 600 /etc/default/insights
🔄 Remote Configuration
The systemd service is configured to fetch Telegraf configuration remotely on startup. This means configuration updates happen automatically without redeploying files to each node.
🔌 API Endpoints
For automation or advanced use cases, you can access configurations directly via API:
Systemd Service Unit (specify node type)
curl -H "Authorization: Token YOUR_TOKEN" \
"http://localhost:8080/config/systemd?cluster_id=YOUR_CLUSTER_ID&node_type=data"
Environment File (shared across all node types)
curl -H "Authorization: Token YOUR_TOKEN" \
"http://localhost:8080/config/environment?cluster_id=YOUR_CLUSTER_ID&environment=production"
Telegraf Configuration (Direct)
curl -H "Authorization: Token YOUR_TOKEN" \
"http://localhost:8080/config/telegraf?cluster_id=YOUR_CLUSTER_ID&environment=production&node_type=data"
Note: Service files require node_type parameter (data/meta/kapa). Environment file is the same for all node types. The remote config approach (systemd + environment) is recommended over downloading telegraf.conf directly.
❓ Token Learning Mode
If your token hasn't been bound to a cluster yet, downloading configurations will work immediately.
The token will be automatically bound to your cluster_id when Telegraf first writes data
to the relay service.
Once bound, the token can only be used with that specific cluster_id for security.