The datasource section configures the connection to your Time Series Database (TSDB), which provides the raw metrics data.
datasource:
url: "http://graphite.example.com:8080"
timeout: 15
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
url |
string | Yes | - | Full URL to the TSDB instance |
timeout |
integer | No | 10 |
Query timeout in seconds |
The URL should point to your Graphite-compatible TSDB endpoint:
# Local development
datasource:
url: "http://localhost:8080"
# Production with HTTPS
datasource:
url: "https://graphite.production.example.com"
# Custom port
datasource:
url: "http://graphite.internal:2003"
The timeout controls how long the metrics-processor waits for TSDB query responses:
datasource:
url: "http://graphite.example.com:8080"
timeout: 30 # Wait up to 30 seconds for queries
Recommendations:
- Development: 5-10 seconds (fast feedback)
- Production: 15-30 seconds (accommodate slow queries)
- Large datasets: 60+ seconds (complex aggregations)
Override datasource settings via environment variables:
# Override URL (useful for containerized deployments)
export MP_DATASOURCE__URL="http://graphite-prod:8080"
# Override timeout
export MP_DATASOURCE__TIMEOUT=30
datasource:
url: "http://localhost:8080"
timeout: 5
datasource:
url: "https://graphite.production.example.com"
timeout: 30
# config.yaml
datasource:
url: "http://graphite:8080"
timeout: 15
# docker-compose.yaml
services:
metrics-processor:
environment:
- MP_DATASOURCE__URL=http://graphite:8080
Currently, the metrics-processor supports:
- Graphite: Full support for Graphite render API
The TSDB type is automatically detected from the query response format.
To verify your datasource connection, start the convertor and check the logs:
RUST_LOG=debug cargo run --bin cloudmon-metrics-convertor -- --config config.yaml
Successful connection shows queries being executed. Connection failures appear as timeout or connection refused errors.
Error: connection refused
Causes:
- TSDB not running
- Wrong URL or port
- Firewall blocking connection
Solutions:
- Verify TSDB is running:
curl http://your-graphite:8080/render?format=json - Check URL in configuration
- Verify network connectivity
Error: request timed out
Causes:
- Slow TSDB queries
- Network latency
- Insufficient timeout value
Solutions:
- Increase
timeoutvalue - Optimize TSDB queries in templates
- Check TSDB performance
Error: invalid URL
Solutions:
- Ensure URL includes protocol (
http://orhttps://) - Verify no trailing slashes or paths
- Overview - Configuration structure
- Metric Templates - Query configuration
- Schema Reference - Complete property reference