Skip to content

Commit

Permalink
fix: missing glob pattern for log rotation (#254)
Browse files Browse the repository at this point in the history
- Based on log rotation patterns current files may not be completely read
  • Loading branch information
arthur-observe authored Nov 1, 2024
1 parent 046c041 commit 933b3d6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: agent
description: Chart to install K8s collection stack based on Observe Agent
type: application
version: 0.27.0
version: 0.27.1
appVersion: "1.1.0"
dependencies:
- name: opentelemetry-collector
Expand Down
6 changes: 3 additions & 3 deletions charts/agent/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# agent

![Version: 0.27.0](https://img.shields.io/badge/Version-0.27.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square)
![Version: 0.27.1](https://img.shields.io/badge/Version-0.27.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square)

> [!CAUTION]
> This chart is under active development and is not meant to be installed yet.
Expand Down Expand Up @@ -342,8 +342,8 @@ Chart to install K8s collection stack based on Observe Agent
| node-logs-metrics.serviceAccount.name | string | `"observe-agent-service-account"` | |
| node-logs-metrics.tolerations | list | `[]` | |
| node.containers.logs.enabled | bool | `true` | |
| node.containers.logs.exclude | string | `"[]"` | |
| node.containers.logs.include | string | `"[\"/var/log/pods/*/*/*.log\", \"/var/log/kube-apiserver-audit.log\"]"` | |
| node.containers.logs.exclude | string | `"[\"/var/log/pods/*/*/*.log.*.gz\"]"` | |
| node.containers.logs.include | string | `"[\"/var/log/pods/*/*/*.log\", \"/var/log/pods/*/*/*.log.*\", \"/var/log/kube-apiserver-audit.log\"]"` | |
| node.containers.logs.lookbackPeriod | string | `"24h"` | |
| node.containers.logs.maxLogSize | string | `"512kb"` | |
| node.containers.logs.retryOnFailure.enabled | bool | `true` | |
Expand Down
6 changes: 4 additions & 2 deletions charts/agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ node:
# Maximum amount of time (including retries) spent trying to send a logs batch to a downstream consumer. Once this value is reached, the data is discarded. Retrying never stops if set to 0.
maxElapsedTime: 5m
# A list of file glob patterns that match the file paths to be read. Need to put inside of '' to avoid helm stripping commas and quotes.
include: '["/var/log/pods/*/*/*.log", "/var/log/kube-apiserver-audit.log"]'
# Log rotation glob assumes rename of file follows this pattern *.log.*
include: '["/var/log/pods/*/*/*.log", "/var/log/pods/*/*/*.log.*", "/var/log/kube-apiserver-audit.log"]'
# A list of file glob patterns to exclude from reading. This is applied against the paths matched by include. Need to put inside of '' to avoid helm stripping commas and quotes.
exclude: '[]'
# Log rotation exclude glob assumes files previously rotated and renamed are zipped after latest rotated file is created
exclude: '["/var/log/pods/*/*/*.log.*.gz"]'
# time unit 1m, 1h
lookbackPeriod: 24h
# At startup, where to start reading logs from the file. Options are beginning or end.
Expand Down

0 comments on commit 933b3d6

Please sign in to comment.