Skip to content

Configuring the Collector

This page explains the settings you can configure in config.yaml. For command usage and operational flags, see CLI Reference.

Your configuration must include these four sections:

  • microsoft_authentication
  • license
  • output
  • collection_config

Use the tenant and app credentials from Azure Permissions.

microsoft_authentication:
graph:
tenant_id: "your-tenant-id"
client_id: "your-client-id"
client_secret: "your-secret"
grant_type: "client_credentials"
cloud_deployment: "global"
license:
filepath: /etc/ms-teams-observability-agent/license.json

The collector will not start without a valid license file.

Enable at least one output backend. Multiple outputs can be active simultaneously.

output:
dynatrace:
enabled: true
dynatrace_tenant_id: "your-tenant-id"
dynatrace_api_token: "your-token"
collection_config:
interval_collection_minutes: 10
max_call_duration_hours: 5
log_level: "INFO"
features:
calls_collection:
enabled: true
issues_collection:
enabled: true

max_call_duration_hours sets the maximum call duration in hours (1–60). Calls exceeding this threshold are considered stale and skipped. This is a required field.

All feature flags default to false. Enable only what you need:

Feature flagDefaultNotes
calls_collectionfalseCore call records and stream details
issues_collectionfalseMicrosoft service health announcements
pstn_calls_collectionfalsePSTN call records
direct_routing_calls_collectionfalseDirect Routing call records
autoattendant_collectionfalseRequires VAAC credentials
callqueue_collectionfalseRequires VAAC credentials

Use the telemetry section to control health telemetry sent to Phenisys.

telemetry:
enabled: false
timeout_seconds: 10
KeyDefaultDescription
enabledfalseEnable or disable telemetry requests entirely
timeout_seconds10Fail-fast timeout in seconds for telemetry HTTP requests (minimum: 1)

Optional: Advanced Scheduler and Calls Controls

Section titled “Optional: Advanced Scheduler and Calls Controls”

Use the advanced section to tune throttling behavior and call processing throughput.

advanced:
scheduler:
respect_persisted_backoff: false
backoff_buffer_seconds: 5
calls:
max_items_per_cycle: null # No cap by default
throttle:
default_retry_after_seconds: 120
max_backoff_seconds: 1800
jitter_percent: 0.2
escalation_multiplier: 2.0
escalation_max_seconds: 3600
rate_limits:
list_per_second: 1.0
detail_per_second: 20.0
KeyDefaultDescription
advanced.scheduler.respect_persisted_backofffalseWhen true, the main loop honors persisted API backoff windows
advanced.scheduler.backoff_buffer_seconds5Extra safety margin added before resuming after backoff (>= 0)
KeyDefaultDescription
advanced.calls.max_items_per_cyclenullMaximum number of new call IDs processed per cycle (>= 1). null means no cap (default).
advanced.calls.throttle.default_retry_after_seconds120Fallback Retry-After when Graph does not provide one (>= 1)
advanced.calls.throttle.max_backoff_seconds1800Cap applied to per-throttle backoff (>= 1)
advanced.calls.throttle.jitter_percent0.2Random jitter ratio added to backoff (0.0 to 1.0)
advanced.calls.throttle.escalation_multiplier2.0Exponential multiplier for consecutive throttles (>= 1.0)
advanced.calls.throttle.escalation_max_seconds3600Hard cap for escalated backoff (>= 1)
advanced.calls.rate_limits.list_per_second1.0Local outbound rate limit for LIST requests (> 0)
advanced.calls.rate_limits.detail_per_second20.0Local outbound rate limit for DETAIL requests (> 0)

Configure how timestamps are formatted in exported records. Applies per output:

output:
dynatrace:
enabled: true
dynatrace_tenant_id: "..."
dynatrace_api_token: "..."
time_fields_format: "iso8601"
ValueExample
epoch_ms (default)1767262830500
epoch_s1767262830
epoch_ns1767262830500000000
iso86012026-01-01T10:20:30.50Z
rfc33392026-01-01T10:20:30.50Z

The collector stores state in a local SQLite database (state.db). Use the database section to control its growth:

database:
outbox_sent_retention_days: 7
outbox_max_attempts: 12
outbox_max_log_age_hours: 168
max_processed_objects_per_type: 100000
KeyDefaultDescription
outbox_sent_retention_days7Days to keep sent outbox messages before purging
outbox_max_attempts12Max export attempts per outbox message before dead-lettering
outbox_max_log_age_hours168Drop stale logs before enqueue and auto-purge stale pending rows during export cycles (null disables this guard)
max_processed_objects_per_type100000Max deduplication cache entries per object type
processed_objects_max_age_hoursautoMax age for cache entries (derived automatically if unset)

Omitting the database section keeps all defaults.

Override default call quality classification thresholds:

advanced:
quality_thresholds:
audio:
max_rtt_ms: 500
max_jitter_ms: 30

Quality thresholds are configurable, but it is recommended to keep the default values unless you have a validated operational reason to tune them.

Always validate before production rollout:

Terminal window
ms-teams-agent validate --config ./config.yaml
ms-teams-agent test-connection --config ./config.yaml