File tree Expand file tree Collapse file tree 4 files changed +33
-26
lines changed
components/vector-kubearchive-log-collector Expand file tree Collapse file tree 4 files changed +33
-26
lines changed Original file line number Diff line number Diff line change 55
55
index :
56
56
prefix : loki_index_
57
57
period : 24h
58
+ # Configure ingestion limits to handle Vector's data volume
59
+ limits_config :
60
+ ingestion_rate_mb : 16 # Increase from default 4MB to 16MB per second
61
+ ingestion_burst_size_mb : 32 # Allow bursts up to 32MB
62
+ max_line_size : 256KB # Allow larger log lines
63
+ max_streams_per_user : 10000 # Allow more streams per tenant
64
+ max_global_streams_per_user : 50000
65
+ reject_old_samples : false # Don't reject old samples
66
+ reject_old_samples_max_age : 168h # Accept samples up to 7 days old
58
67
# Required storage configuration for Helm chart
59
68
storage :
60
69
type : filesystem
Original file line number Diff line number Diff line change @@ -118,7 +118,8 @@ customConfig:
118
118
# Direct connection to Loki service (no gateway)
119
119
endpoint : " http://vector-kubearchive-log-collector-loki.product-kubearchive-logging.svc.cluster.local:3100"
120
120
encoding :
121
- codec : " json"
121
+ codec : " text" # Use text instead of json to avoid metadata issues
122
+ except_fields : ["tmp"] # Exclude temporary fields
122
123
auth :
123
124
strategy : " basic"
124
125
user : " ${LOKI_USERNAME}"
@@ -127,10 +128,12 @@ customConfig:
127
128
request :
128
129
headers :
129
130
X-Scope-OrgID : kubearchive
131
+ timeout_secs : 60 # Shorter timeout
130
132
batch :
131
- max_bytes : 10485760
132
- timeout_secs : 300
133
- compression : " none"
133
+ max_bytes : 2097152 # Reduce to 2MB (half of Loki's 4MB/sec limit)
134
+ max_events : 1000 # Limit number of events per batch
135
+ timeout_secs : 10 # Send batches more frequently
136
+ compression : " gzip" # Enable compression to reduce data size
134
137
labels :
135
138
job : " vector"
136
139
pod_id : " {{`{{ pod_id }}`}}"
@@ -140,7 +143,7 @@ customConfig:
140
143
buffer :
141
144
type : " memory"
142
145
max_events : 10000
143
- when_full : " block "
146
+ when_full : " drop_newest " # Drop newest instead of blocking
144
147
env :
145
148
- name : LOKI_USERNAME
146
149
valueFrom :
Original file line number Diff line number Diff line change 53
53
index :
54
54
prefix : loki_index_
55
55
period : 24h
56
+ # Configure ingestion limits to handle Vector's data volume
57
+ limits_config :
58
+ ingestion_rate_mb : 16 # Increase from default 4MB to 16MB per second
59
+ ingestion_burst_size_mb : 32 # Allow bursts up to 32MB
60
+ max_line_size : 256KB # Allow larger log lines
61
+ max_streams_per_user : 10000 # Allow more streams per tenant
62
+ max_global_streams_per_user : 50000
63
+ reject_old_samples : false # Don't reject old samples
64
+ reject_old_samples_max_age : 168h # Accept samples up to 7 days old
56
65
# Required storage configuration for Helm chart
57
66
storage :
58
67
type : s3
Original file line number Diff line number Diff line change 2
2
role : Agent
3
3
resources :
4
4
requests :
5
- cpu : 200m
6
- memory : 1024Mi
5
+ cpu : 512m
6
+ memory : 4096Mi
7
7
limits :
8
- cpu : 1000m
9
- memory : 2048Mi
8
+ cpu : 2000m
9
+ memory : 4096Mi
10
10
customConfig :
11
11
data_dir : /vector-data-dir
12
12
api :
@@ -20,6 +20,7 @@ customConfig:
20
20
glob_minimum_cooldown_ms : 500
21
21
max_line_bytes : 3145728
22
22
auto_partial_merge : true
23
+ extra_label_selector : " app.kubernetes.io/managed-by in (tekton-pipelines,pipelinesascode.tekton.dev)"
23
24
transforms :
24
25
reduce_events :
25
26
type : reduce
@@ -92,24 +93,9 @@ customConfig:
92
93
.log_type = "application"
93
94
}
94
95
# --- End: Cronjob Specific Handling ---
95
- # Handling general Kubernetes labels
96
- if exists(.tmp.kubernetes.pod_labels) {
97
- .pod_labels = .tmp.kubernetes.pod_labels
98
- } else {
99
- .pod_labels = "no_labels"
100
- }
101
- # General message field handling
102
- if exists(.tmp.message) {
103
- .message = to_string(del(.tmp.message)) ?? "no_message"
104
- } else {
105
- .message = "no_message"
106
- }
107
- # Basic data sanitization to prevent 400 errors
108
- # Truncate very long messages
109
- if length(.message) > 32768 {
110
- .message = slice!(.message, 0, 32768) + "...[TRUNCATED]"
111
- }
112
96
# Clean up temporary fields
97
+ .container = del(.tmp.kubernetes.container_name)
98
+ .message = del(.tmp.message)
113
99
del(.tmp)
114
100
sinks :
115
101
loki :
You can’t perform that action at this time.
0 commit comments