Skip to content

Conversation

@paulohtb6
Copy link
Collaborator

@paulohtb6 paulohtb6 commented Jul 24, 2025

Description

Resolves https://redpandadata.atlassian.net/browse/DOC-1426
Review deadline: 30th July

Page previews

Checks

  • New feature
  • Content gap
  • Support Follow-up
  • Small fix (typos, links, copyedits, etc)

@paulohtb6 paulohtb6 requested a review from a team as a code owner July 24, 2025 22:01
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 24, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

The changes update documentation related to memory monitoring in Redpanda. The previous guidance, which focused on allocated and free memory, is replaced with a recommendation to use the redpanda_memory_available_memory metric for a more accurate assessment of memory availability and pressure. New PromQL queries are provided to calculate both the percentage of available memory and memory pressure. Additionally, a new metric, redpanda_memory_available_memory_low_water_mark, is documented, offering insight into the lowest available memory since process start. Usage notes for existing metrics are updated to reflect these changes.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Documentation
    participant Monitoring System

    User->>Documentation: Refer to memory monitoring section
    Documentation->>User: Recommend using redpanda_memory_available_memory
    User->>Monitoring System: Query redpanda_memory_available_memory
    Monitoring System-->>User: Return available memory data
    User->>Documentation: Refer to PromQL queries for memory pressure
    Documentation->>User: Provide queries for available memory and pressure
    User->>Monitoring System: Query redpanda_memory_available_memory_low_water_mark
    Monitoring System-->>User: Return historical low water mark data
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Suggested reviewers

  • Feediver1
  • rockwotj
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch DOC-1426-monitoring-available-metric

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@netlify
Copy link

netlify bot commented Jul 24, 2025

Deploy Preview for redpanda-docs-preview failed. Why did it fail? →

Name Link
🔨 Latest commit 9f2063a
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-docs-preview/deploys/688d08659506040008968c03

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
modules/reference/pages/public-metrics-reference.adoc (1)

700-702: Minor wording tweak.

“To … be immediately allocated” reads awkwardly. Suggest “…can be immediately reallocated” or “…can be allocated immediately”.

modules/manage/partials/monitor-health.adoc (1)

67-74: Consider emitting a 0-100 gauge instead of teaching users to derive one.

The “memory pressure” query is just 1-<previous expr> multiplied by 100. Shipping a ready-made gauge (redpanda_memory_pressure_ratio) would simplify dashboards and avoid copy-paste errors.

If adding a new metric is out-of-scope, at least multiply by 100 in the example so the unit matches “percentage” in the prose.

-1 - (sum(...))
+(1 - (sum(...))) * 100
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c992001 and 71b43e4.

📒 Files selected for processing (2)
  • modules/manage/partials/monitor-health.adoc (1 hunks)
  • modules/reference/pages/public-metrics-reference.adoc (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: JakeSCahill
PR: redpanda-data/docs#1192
File: modules/deploy/partials/requirements.adoc:91-93
Timestamp: 2025-07-02T14:54:03.506Z
Learning: In Redpanda documentation, use GiB (binary units, powers of 2) for Kubernetes-specific memory requirements because Kubernetes treats memory units like Mi, Gi as binary units. Use GB (decimal units, powers of 10) for general broker memory requirements in non-Kubernetes contexts.
Learnt from: Feediver1
PR: redpanda-data/docs#1153
File: antora.yml:3-5
Timestamp: 2025-07-14T19:28:43.296Z
Learning: In Redpanda docs, during beta releases, the version metadata may intentionally show inconsistencies where the header displays the beta version (e.g., 25.2 Beta) while internal attributes like full-version, latest-redpanda-tag, operator-beta-tag still reference the stable version (e.g., 25.1). This is resolved during the GA merge process when all version references are synchronized.
Learnt from: Feediver1
PR: redpanda-data/docs#1153
File: modules/reference/pages/properties/topic-properties.adoc:45-50
Timestamp: 2025-07-16T19:33:20.420Z
Learning: In the Redpanda documentation, topic property cross-references like <<max.compaction.lag.ms>> and <<min.compaction.lag.ms>> require corresponding property definition sections with anchors like [[maxcompactionlagms]] and [[mincompactionlagms]] to prevent broken links.
Learnt from: paulohtb6
PR: redpanda-data/docs#0
File: :0-0
Timestamp: 2025-07-15T20:38:27.458Z
Learning: In Redpanda documentation, "Redpanda Data" refers to the company name, while "Redpanda" refers to the product name. These terms should be used appropriately based on context.
modules/manage/partials/monitor-health.adoc (1)

Learnt from: JakeSCahill
PR: #1192
File: modules/deploy/partials/requirements.adoc:91-93
Timestamp: 2025-07-02T14:54:03.506Z
Learning: In Redpanda documentation, use GiB (binary units, powers of 2) for Kubernetes-specific memory requirements because Kubernetes treats memory units like Mi, Gi as binary units. Use GB (decimal units, powers of 10) for general broker memory requirements in non-Kubernetes contexts.

modules/reference/pages/public-metrics-reference.adoc (3)

Learnt from: JakeSCahill
PR: #1192
File: modules/deploy/partials/requirements.adoc:91-93
Timestamp: 2025-07-02T14:54:03.506Z
Learning: In Redpanda documentation, use GiB (binary units, powers of 2) for Kubernetes-specific memory requirements because Kubernetes treats memory units like Mi, Gi as binary units. Use GB (decimal units, powers of 10) for general broker memory requirements in non-Kubernetes contexts.

Learnt from: Feediver1
PR: #1153
File: modules/reference/pages/properties/topic-properties.adoc:45-50
Timestamp: 2025-07-16T19:33:20.420Z
Learning: In the Redpanda documentation, topic property cross-references like <<max.compaction.lag.ms>> and <<min.compaction.lag.ms>> require corresponding property definition sections with anchors like [[maxcompactionlagms]] and [[mincompactionlagms]] to prevent broken links.

Learnt from: Feediver1
PR: #1153
File: antora.yml:3-5
Timestamp: 2025-07-14T19:28:43.296Z
Learning: In Redpanda docs, during beta releases, the version metadata may intentionally show inconsistencies where the header displays the beta version (e.g., 25.2 Beta) while internal attributes like full-version, latest-redpanda-tag, operator-beta-tag still reference the stable version (e.g., 25.1). This is resolved during the GA merge process when all version references are synchronized.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Redirect rules - redpanda-docs-preview
  • GitHub Check: Header rules - redpanda-docs-preview
  • GitHub Check: Pages changed - redpanda-docs-preview
🔇 Additional comments (2)
modules/manage/partials/monitor-health.adoc (2)

78-79: Broken context anchor.

After deleting the duplicate block in the metrics reference file, ensure this link still resolves:

redpanda_memory_available_memory_low_water_mark

If the anchor moves, update this reference or add [[redpanda_memory_available_memory_low_water_mark]] in the canonical section.


56-66: Existing memory‐availability formula is correct—no double count of reclaimable

The current query

sum(redpanda_memory_available_memory)
  / (sum(redpanda_memory_free_memory) + sum(redpanda_memory_allocated_memory))

already computes
• numerator = free + reclaimable
• denominator = free + (reclaimable + non-reclaimable) = total memory

There is no duplicate reclaimable term. Please ignore the suggested diff.

Likely an incorrect or invalid review comment.

Copy link
Member

@travisdowns travisdowns left a comment

Choose a reason for hiding this comment

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

some suggestions on the files

Co-authored-by: Travis Downs <travis.downs@gmail.com>
@Feediver1
Copy link
Contributor

What's the current status of this @paulohtb6? thx

paulohtb6 and others added 3 commits July 31, 2025 14:45
@paulohtb6
Copy link
Collaborator Author

@Feediver1 waiting on re-review after I applied the review points.

Copy link

@masapanda masapanda left a comment

Choose a reason for hiding this comment

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

Thank you for completing this request!

Co-authored-by: Joyce Fee <102751339+Feediver1@users.noreply.github.com>
@paulohtb6 paulohtb6 merged commit 5700523 into main Aug 1, 2025
2 of 6 checks passed
@paulohtb6 paulohtb6 deleted the DOC-1426-monitoring-available-metric branch August 1, 2025 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants