Skip to content

Commit

Permalink
change format of log file s3 key
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Zubenko committed Oct 18, 2023
1 parent b2bfc5e commit aaaaa8e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
total_file_size 1M
upload_timeout 1m
use_put_object On
s3_key_format /$TAG/%Y%m%d%H%M_$INDEX.gz
s3_key_format /$TAG/%Y%m%d%H%M__$INDEX.gz
static_file_path On
json_date_key time
{{- end }}
2 changes: 1 addition & 1 deletion charts/platform-monitoring/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fluentbit:
operator: Exists
podAnnotations: {}
taildb:
directory: /var/lib/platform-monitoring/fluent-bit
directory: /var/lib/platform-monitoring-fluent-bit
logLevel: info

minioGateway:
Expand Down
2 changes: 1 addition & 1 deletion platform_monitoring/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ async def _load_log_keys(self, since: Optional[datetime]) -> list[str]:
# get time slice from s3 key
time_slice_str = basename(s3_key).split(".")[0].split("_")
start_time_str = time_slice_str[0]
index = int(time_slice_str[1])
index = int(time_slice_str[-1])
if start_time_str >= since_time_str:
keys.append((start_time_str, index, s3_key))
keys.sort() # order keys by time slice
Expand Down
2 changes: 1 addition & 1 deletion tests/k8s/logging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ data:
total_file_size 1M
upload_timeout 1s
use_put_object On
s3_key_format /$TAG/%Y%m%d%H%M_$INDEX.gz
s3_key_format /$TAG/%Y%m%d%H%M__$INDEX.gz
static_file_path On
json_date_key time
---
Expand Down

0 comments on commit aaaaa8e

Please sign in to comment.