# Telegraf — receives Cisco IOS-XE gRPC dial-out, forwards to InfluxDB 2.

[agent]
  interval            = "10s"
  round_interval      = true
  metric_batch_size   = 1000
  metric_buffer_limit = 10000
  flush_interval      = "10s"
  omit_hostname       = false

# ── Input: Cisco model-driven telemetry (dial-out / gRPC) ────────────────
# The router / switch connects TO this socket and pushes telemetry to us.
[[inputs.cisco_telemetry_mdt]]
  transport       = "grpc"
  service_address = ":57000"

  # TLS — uncomment and mount certs into the container for production.
  # tls_cert      = "/etc/telegraf/certs/collector.crt"
  # tls_key       = "/etc/telegraf/certs/collector.key"
  # tls_client_ca = "/etc/telegraf/certs/ca.crt"

  # Friendly measurement names per subscription id. Keep in sync with
  # the router's `telemetry ietf subscription N` stanzas.
  [inputs.cisco_telemetry_mdt.aliases]
    "101" = "cpu"
    "102" = "memory"
    "103" = "interfaces"
    "104" = "cdp"
    "105" = "ospf_interfaces"
    "106" = "ospf_neighbors"

# ── Output: InfluxDB v2 ──────────────────────────────────────────────────
[[outputs.influxdb_v2]]
  urls         = ["http://influxdb:8086"]
  token        = "${INFLUXDB_TOKEN}"
  organization = "myorg"
  bucket       = "telegraf"
