Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hackathon 2024 | Log Analyzer #1490

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Neon-White
Copy link
Contributor

@Neon-White Neon-White commented Dec 10, 2024

A collaborative effort with @shirady

Implemented a new log analyzer functionality inside the NooBaa CLI tool.
The tool can be found under nb diagnostics.

Output example:

$ nb diagnostics log-analysis --tail 1000 -i --fuzzy s3error
INFO[0000]
INFO[0000] ✨────────────────────────────────────────────✨
INFO[0000]    Collecting and analyzing pod logs -
INFO[0000]    Search string: s3error
INFO[0000]    Case insensitivity: true
INFO[0000]    Match whole string: false
INFO[0000]    From the last 1000 lines
INFO[0000]    Using Kubernetes timestamps
INFO[0000]    Found occurrences will be printed below
INFO[0000]    in the format <pod name>:<container name>
INFO[0000] ✨────────────────────────────────────────────✨
INFO[0000] Analyzing noobaa-core-0:core
INFO[0001] Hits: 411
INFO[0001] Earliest appearance: 2024-12-11T09:04:05.245904744Z
INFO[0001] Latest appearance:   2024-12-11T09:11:51.054808004Z
INFO[0001] ──────────────────────────────────────────────────────────────────────────────────
INFO[0001] Analyzing noobaa-core-0:noobaa-log-processor
INFO[0001] No occurrences found
INFO[0001] ──────────────────────────────────────────────────────────────────────────────────
INFO[0001] Analyzing noobaa-db-pg-0:db
INFO[0001] No occurrences found
INFO[0001] ──────────────────────────────────────────────────────────────────────────────────
INFO[0001] Analyzing noobaa-default-backing-store-noobaa-pod-08270bcd:noobaa-agent
INFO[0001] Hits: 111
INFO[0001] Earliest appearance: 2024-12-11T08:36:42.050234365Z
INFO[0001] Latest appearance:   2024-12-11T09:11:20.498970755Z
INFO[0001] ──────────────────────────────────────────────────────────────────────────────────
INFO[0001] Analyzing noobaa-endpoint-7995576ddc-tq9p4:endpoint
INFO[0001] Hits: 6
INFO[0001] Earliest appearance: 2024-12-11T08:32:04.879477461Z
INFO[0001] Latest appearance:   2024-12-11T08:36:27.793515138Z
INFO[0001] ──────────────────────────────────────────────────────────────────────────────────
INFO[0001] Analyzing noobaa-operator-68f66b987b-dz4xw:noobaa-operator
INFO[0001] Hits: 10
INFO[0001] Earliest appearance: 2024-12-11T09:10:43.972246776Z
INFO[0001] Latest appearance:   2024-12-11T09:11:50.359484454Z
INFO[0001] ──────────────────────────────────────────────────────────────────────────────────

@Neon-White Neon-White force-pushed the the-log-analyzer-returns branch 3 times, most recently from 1d93f27 to d248009 Compare December 11, 2024 08:44
@Neon-White Neon-White changed the title Log Analyzer Hackathon 2024 | Log Analyzer Dec 11, 2024
@Neon-White Neon-White force-pushed the the-log-analyzer-returns branch 5 times, most recently from 651cac1 to 8f008a2 Compare December 11, 2024 13:11
Co-authored-by: shirady <[email protected]>
Signed-off-by: Ben <[email protected]>
@Neon-White Neon-White force-pushed the the-log-analyzer-returns branch from 8f008a2 to a10d77a Compare December 11, 2024 13:14
@nimrod-becker
Copy link
Contributor

Feedback from the session

  1. Maybe add a mapping of terms to potential issues, Romy has already added a similar doc (.md) for NS FS issues
  2. Adding the enhancement of auto detecting and printing a summary of found errors in the logs (so not asking for a phrase, but auto analyze for found error ) can really be a valuable addition

@Neon-White
Copy link
Contributor Author

Adding to @nimrod-becker's #1490 (comment) - parsing a must-gather and running on it instead of a live cluster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants