-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
5
-
False
-
False
-
NEW
-
OBSDA-228 - Log filtering and collecting
-
NEW
-
It is now possible to include or exclude logs by container or namespace at input, with a goal of reducing the throughput on the collector.
-
Enhancement
-
Log Collection - Sprint 246, Log Collection - Sprint 247, Log Collection - Sprint 248, Log Collection - Sprint 249
Summary
As an administrator,
I want to include or exclude logs being collected using metadata
so that I collect only the logs I am interested in.
As a developer,
I want to include or exclude logs being collected using metadata
in order to reduce the memory and cpu load on the collector
Acceptance Criteria
- Verify logs are collected or excluded based upon pod namespace
- Verify logs are collected or excluded based upon matching pod labels
- Verify logs are collected or excluded based upon matching pod expressions
- Verify logs are collected or excluded based upon container name
- Verify namespace, excludeNamespaces, containers support the use of exact names
- Verify namespace, excludeNamespaces, containers support the use of path globs (e.g. foo*, b*r)
- Verify namespace, excludeNamespaces only allow kubernetes valid namespaces names plus '*'
Notes
Proposed Spec
spec:
inputs:
- name:
application:
namespaces: [] # exact or glob
excludeNamespaces: [] # exact or glob
selector:
matchLabels:
matchExpressions:
- key:
operator:
values: []
containers:
include: []string
exclude: []string #support exact or glob
Original Notes
The ClusterLogForwarder already allows selecting of logs that belong to a given namespace:
inputs: name: interesting application: namespaces: [fun, exciting, wild]
This story adds a new field excludeNamespaces
inputs: name: interesting application: namespaces: [fun, exciting, wild] excludeNamespaces: [dull, boring, tedious]
This excludes logs from all namespaces on the list.
Semantics
- namepaces: include only logs from namespaces on the list.
- excludeNamespaces: include logs from all namespaces not on the list.
- both: include only logs from namespaces listed in namespaces that are not in excludeNamespaces. In other words excludeNamespaces takes precedence.
Note: the namespace filters take precedence over other filters, logically we:
- Exclude all logs that not selected by namespaces and excludeNamespaces.
- Apply other filtering rules (labels etc.)
- is blocked by
-
LOG-4739 Enhance Vector kubernetes_logs to support include_paths_glob_patterns
- Closed
- links to
-
RHBA-2024:1591 Logging for Red Hat OpenShift - 5.9.0
- mentioned on
1.
|
Add CLF API | Closed | Jeffrey Cantrill | ||
2.
|
Refactor input validation to separate package | Closed | Jeffrey Cantrill | ||
3.
|
Add inputspec validations | Closed | Jeffrey Cantrill | ||
4.
|
Impl match labelExpressions | Closed | Jeffrey Cantrill | ||
5.
|
Write e2e tests | Closed | Jeffrey Cantrill |