Skip to content

feat(anolisa): add logrotate config for ops telemetry#1094

Merged
Forrest-ly merged 2 commits into
alibaba:mainfrom
KaiLongZhou:anolisa-telemetry
Jun 26, 2026
Merged

feat(anolisa): add logrotate config for ops telemetry#1094
Forrest-ly merged 2 commits into
alibaba:mainfrom
KaiLongZhou:anolisa-telemetry

Conversation

@KaiLongZhou

@KaiLongZhou KaiLongZhou commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Add /etc/logrotate.d/anolisa to bound disk usage of ops telemetry JSONL files under /var/log/anolisa/sls/ops/. The policy rotates at 30M per file and keeps one historical copy, using create mode so ilogtail inode offsets survive rename-based rotation.

logrotate setup runs during register and is intentionally preserved during unregister: the .jsonl files remain writable by components, so size control is still required.

Remove the daily trigger from the policy; size-based rotation is sufficient for these best-effort telemetry buffers.

Known limitations:

  • Requires host logrotate and cron/timer to actually perform rotation.
  • Lightweight containers without cron/logrotate will not benefit.

Assisted-by: Qoder:latest

Description

Related Issue

closes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional change)
  • Performance improvement
  • CI/CD or build changes

Scope

  • cosh (copilot-shell)
  • sec-core (agent-sec-core)
  • skill (os-skills)
  • sight (agentsight)
  • tokenless (tokenless)
  • ckpt (ws-ckpt)
  • memory (agent-memory)
  • anolisa (anolisa-cli)
  • skillfs (SkillFS)
  • Multiple / Project-wide

Checklist

  • I have read the Contributing Guide
  • My code follows the project's code style
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the documentation accordingly
  • For cosh: Lint passes, type check passes, and tests pass
  • For sec-core (Rust): cargo clippy -- -D warnings and cargo fmt --check pass
  • For sec-core (Python): Ruff format and pytest pass
  • For skill: Skill directory structure is valid and shell scripts pass syntax check
  • For sight: cargo clippy -- -D warnings and cargo fmt --check pass
  • For tokenless: cargo clippy -- -D warnings and cargo fmt --check pass
  • For memory (Linux only): cargo clippy --all-targets -- -D warnings, cargo fmt --check, and cargo test pass
  • For anolisa: cargo clippy --all-targets --locked -- -D warnings, cargo fmt --all --check, and cargo test --locked pass
  • For skillfs: cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, and cargo test --workspace pass
  • Lock files are up to date (package-lock.json / Cargo.lock)

Testing

Additional Notes

Add /etc/logrotate.d/anolisa to bound disk usage of ops telemetry JSONL
files under /var/log/anolisa/sls/ops/. The policy rotates at 30M per
file and keeps one historical copy, using create mode so ilogtail inode
offsets survive rename-based rotation.

logrotate setup runs during register and is intentionally preserved
during unregister: the .jsonl files remain writable by components, so
size control is still required.

Remove the daily trigger from the policy; size-based rotation is
sufficient for these best-effort telemetry buffers.

Known limitations:
- Requires host logrotate and cron/timer to actually perform rotation.
- Lightweight containers without cron/logrotate will not benefit.

Signed-off-by: KaiLong Zhou <zhoukailong.zkl@alibaba-inc.com>
Assisted-by: Qoder:latest
Ubuntu and many Debian-based distributions symlink /bin/sh to dash,
which does not support the bash syntax used by the ilogtail installation
script. Switch to explicit bash to prevent install failures on these
systems.

Assisted-by: Qoder:latest
Signed-off-by: KaiLong Zhou <zhoukailong.zkl@alibaba-inc.com>

@Forrest-ly Forrest-ly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Forrest-ly Forrest-ly merged commit a96f778 into alibaba:main Jun 26, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants