Skip to content

Fix gorouter logging in small cf deployment #75

@rkoster

Description

@rkoster

Logging is not working on gorouters without this fix:

---
# Fix missing log forwarding on the router VM
#
# The loggregator_agent and loggr-syslog-agent BOSH addons exclude VMs that
# have the smoke_tests job. Since smoke_tests is co-located on the router
# instance group, the router never gets these jobs — causing access logs
# (RTR messages) to be silently dropped instead of forwarded to log-cache.
#
# This ops file adds both jobs directly to the router instance group,
# bypassing the addon exclusion.

# Add loggregator_agent to the router instance group
# This provides the ingress_port.yml that loggr-forwarder-agent needs
# to discover its downstream target, and forwards logs to log-cache/doppler.
- type: replace
  path: /instance_groups/name=router/jobs/-
  value:
    name: loggregator_agent
    properties:
      disable_udp: true
      grpc_port: 3459
      loggregator:
        tls:
          agent:
            cert: ((loggregator_tls_agent.certificate))
            key: ((loggregator_tls_agent.private_key))
          ca_cert: ((loggregator_tls_agent.ca))
      metrics:
        ca_cert: ((loggregator_agent_metrics_tls.ca))
        cert: ((loggregator_agent_metrics_tls.certificate))
        key: ((loggregator_agent_metrics_tls.private_key))
        server_name: loggregator_agent_metrics
    release: loggregator-agent

# Add loggr-syslog-agent to the router instance group
# This enables syslog drain forwarding for router logs.
- type: replace
  path: /instance_groups/name=router/jobs/-
  value:
    name: loggr-syslog-agent
    properties:
      cache:
        tls:
          ca_cert: ((syslog_agent_api_tls.ca))
          cert: ((syslog_agent_api_tls.certificate))
          cn: binding-cache
          key: ((syslog_agent_api_tls.private_key))
      metrics:
        ca_cert: ((syslog_agent_metrics_tls.ca))
        cert: ((syslog_agent_metrics_tls.certificate))
        key: ((syslog_agent_metrics_tls.private_key))
        server_name: syslog_agent_metrics
      port: 3460
      tls:
        ca_cert: ((loggregator_tls_agent.ca))
        cert: ((loggregator_tls_agent.certificate))
        key: ((loggregator_tls_agent.private_key))
    release: loggregator-agent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions