I am using Datadog for collecting logs and metrics from services running in Google Kubernetes Engine (GKE). I have configured Datadog with specific inclusion and exclusion rules for collecting logs, and I'm encountering an issue with excluding Kong status check logs.
My current Datadog configuration in datadog-values.yaml looks like this:
datadog:
apiKeyExistingSecret: datadog-secret
apm:
instrumentation:
enabled: true
site: datadoghq.eu
logs:
enabled: true
containerCollectAll: true
env:
- name: DD_CONTAINER_EXCLUDE_LOGS
value: image:.*
- name: DD_CONTAINER_INCLUDE_LOGS
value: image:.*kong.* image:.*alore.*
I want to exclude logs generated by Kong status checks, specifically those with the request pattern "GET /status HTTP/2.0".
To achieve this, I attempted to add a log processing rule using the DD_LOGS_CONFIG_PROCESSING_RULES environment variable:
env:
- name: DD_LOGS_CONFIG_PROCESSING_RULES
value: '[{"type": "exclude_at_match", "name": "exclude_healthcheck_logs", "pattern" : "^GET /status http/2\.0$"}]'
However, after adding this environment variable to my datadog-values.yaml, Kong logs stopped appearing in Datadog.
I expect Kong logs to continue coming into Datadog, while excluding logs related to the status checks.
I am seeking guidance on how to properly configure Datadog to achieve this exclusion while ensuring that Kong logs are still collected.
Any assistance or suggestions would be greatly appreciated. Thank you!