Example of OTEL config for filtering logs to an external syslog server
search cancel

Example of OTEL config for filtering logs to an external syslog server

book

Article ID: 440319

calendar_today

Updated On:

Products

VMware Tanzu Application Service

Issue/Introduction

This KB provide an example OTEL config for filtering logs to an external syslog server

For a general guideline on how to configure OTEL please see docs.

Resolution

Here is a sample OTEL configuration where it sends a filtered log to an external syslog server:

exporters:
  syslog/external:
  endpoint: syslog-external-fqdn-or-ip
    port: 514
    network: tcp
    tls:
      insecure_skip_verify: true
processors:
  filter/syslog-external:
    error_mode: ignore
    logs:
      log_record:
        - 'not(IsMatch(attributes["message"], "AuthenticationFailure|TokenIssuedEvent|userAuthenticationMechanism|UserCreatedEvent|UserDeletedEvent|audit.user.organization_manager_add|audit.user.space_manager_add|PasswordChange|GroupModifiedEvent"))'
        - 'IsMatch(attributes["message"], "DEBUG|system_services|tile_installer")'

service:
  pipelines:
  logs:
      processors:
      - filter/syslog-external
      exporters:
      - syslog/external