Skip to content

using grafana#890

Open
Bonusree wants to merge 4 commits into
masterfrom
grafana
Open

using grafana#890
Bonusree wants to merge 4 commits into
masterfrom
grafana

Conversation

@Bonusree

@Bonusree Bonusree commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive guide for visualizing PostgreSQL metrics with a Grafana Dashboard. Includes step-by-step setup for the monitoring stack, configuring Prometheus scraping via generated ServiceMonitors, accessing Grafana, importing provided PostgreSQL dashboard visuals, using dashboard filters, and cleanup/uninstall instructions.

Signed-off-by: Bonusree <bonusree@appscode.com>
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 601a9353-7cec-43f7-9aec-59ee7a9e062a

📥 Commits

Reviewing files that changed from the base of the PR and between 6005478 and a44fe6c.

⛔ Files ignored due to path filters (10)
  • docs/images/postgres/monitoring/pg-grafana-database-2.png is excluded by !**/*.png
  • docs/images/postgres/monitoring/pg-grafana-database.png is excluded by !**/*.png
  • docs/images/postgres/monitoring/pg-grafana-home.png is excluded by !**/*.png
  • docs/images/postgres/monitoring/pg-grafana-import.png is excluded by !**/*.png
  • docs/images/postgres/monitoring/pg-grafana-login.png is excluded by !**/*.png
  • docs/images/postgres/monitoring/pg-grafana-pod-2.png is excluded by !**/*.png
  • docs/images/postgres/monitoring/pg-grafana-pod.png is excluded by !**/*.png
  • docs/images/postgres/monitoring/pg-grafana-summary-2.png is excluded by !**/*.png
  • docs/images/postgres/monitoring/pg-grafana-summary.png is excluded by !**/*.png
  • docs/images/postgres/monitoring/pg-prom-targets.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • docs/guides/postgres/monitoring/grafana-dashboard.md
✅ Files skipped from review due to trivial changes (1)
  • docs/guides/postgres/monitoring/grafana-dashboard.md

📝 Walkthrough

Walkthrough

A new documentation guide is added at docs/guides/postgres/monitoring/grafana-dashboard.md that walks through deploying kube-prometheus-stack, installing Panopticon, deploying a KubeDB PostgreSQL instance with ServiceMonitor configuration, verifying Prometheus scraping, accessing Grafana, importing three PostgreSQL dashboard JSON files, and cleaning up.

Changes

New PostgreSQL Grafana Dashboard Guide

Layer / File(s) Summary
Prerequisites, stack install, and Panopticon setup
docs/guides/postgres/monitoring/grafana-dashboard.md
Frontmatter, guide intro callout, prerequisites listing the kubedb-metrics.enabled=true flag and required namespaces, kube-prometheus-stack Helm install steps with serviceMonitorSelector label retrieval, and Panopticon install with matching serviceMonitor label configuration.
PostgreSQL CR deployment and Prometheus scrape verification
docs/guides/postgres/monitoring/grafana-dashboard.md
Deploy PostgreSQL custom resource with monitor.prometheus.serviceMonitor configured for scrape interval and label matching, verify the created services and ServiceMonitor, port-forward Prometheus, and confirm the stats target appears at /targets.
Grafana access, data source config, and dashboard import
docs/guides/postgres/monitoring/grafana-dashboard.md
Port-forward Grafana, retrieve admin password from the Grafana secret, configure Prometheus as a data source (skipped when using the bundled stack), import three PostgreSQL dashboard JSON files (Summary, Pod, Database), and use dashboard variable dropdown filters with panel descriptions.
Cleanup and next steps
docs/guides/postgres/monitoring/grafana-dashboard.md
Commands to delete the PostgreSQL instance and namespaces, optionally uninstall the monitoring stack and operators, plus next-step links to built-in Prometheus and Prometheus Operator monitoring guides and contribution guidelines.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐇 Hop through the metrics, one step at a time,
A dashboard for Postgres, oh look how it shines!
Panopticon watches, the ServiceMonitor purrs,
Grafana glitters with bars, lines, and curves.
Three JSON dashboards to import with glee—
KubeDB monitoring, as easy as can be! 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'using grafana' is vague and generic, lacking specificity about what the documentation change accomplishes or its scope. Consider a more descriptive title such as 'Add Grafana dashboard monitoring guide for PostgreSQL' or 'Document PostgreSQL metrics visualization with Grafana'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch grafana

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/guides/mssqlserver/backup/application-level/index.md`:
- Line 25: The KubeStash prerequisite link URL is missing a trailing slash that
is present in all other prerequisite links across the PR. In the line containing
the KubeStash setup link, add a trailing slash to the URL so it reads
https://kubestash.com/docs/latest/setup/ instead of
https://kubestash.com/docs/latest/setup to maintain consistent URL formatting
with the other seven changed files that use normalized paths with trailing
slashes.

In `@docs/guides/postgres/monitoring/grafana-dashboard.md`:
- Line 240: The guide incorrectly references the opnpulse/dashboards repository
for downloading PostgreSQL dashboards. Replace the repository link and
organization reference in the line that mentions downloading dashboard JSON
files from the incorrect location. Update the reference to point to the
appscode/grafana-dashboards repository on GitHub instead, maintaining the
postgres/ folder path reference while correcting both the organization name
(opnpulse to appscode) and the repository name (dashboards to
grafana-dashboards) in both the markdown link text and the URL.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a3ab2f49-8baa-4d6d-920b-4647945e6e19

📥 Commits

Reviewing files that changed from the base of the PR and between 7170308 and 5483597.

📒 Files selected for processing (50)
  • docs/guides/cassandra/backup/kubestash/logical/index.md
  • docs/guides/cassandra/backup/kubestash/overview/index.md
  • docs/guides/druid/backup/application-level/index.md
  • docs/guides/druid/backup/auto-backup/index.md
  • docs/guides/druid/backup/cross-ns-dependencies/index.md
  • docs/guides/druid/backup/logical/index.md
  • docs/guides/druid/backup/overview/index.md
  • docs/guides/elasticsearch/backup/kubestash/auto-backup/index.md
  • docs/guides/elasticsearch/backup/kubestash/logical/index.md
  • docs/guides/elasticsearch/backup/kubestash/overview/index.md
  • docs/guides/mariadb/backup/kubestash/application-level/index.md
  • docs/guides/mariadb/backup/kubestash/auto-backup/index.md
  • docs/guides/mariadb/backup/kubestash/logical/index.md
  • docs/guides/mariadb/backup/kubestash/overview/index.md
  • docs/guides/mongodb/backup/kubestash/application-level/index.md
  • docs/guides/mongodb/backup/kubestash/auto-backup/index.md
  • docs/guides/mongodb/backup/kubestash/logical/replicaset/index.md
  • docs/guides/mongodb/backup/kubestash/logical/sharding/index.md
  • docs/guides/mongodb/backup/kubestash/logical/standalone/index.md
  • docs/guides/mongodb/backup/kubestash/overview/index.md
  • docs/guides/mongodb/schema-manager/deploy-mongodbdatabase/index.md
  • docs/guides/mongodb/schema-manager/initializing-with-script/index.md
  • docs/guides/mongodb/schema-manager/initializing-with-snapshot/index.md
  • docs/guides/mssqlserver/backup/application-level/index.md
  • docs/guides/mssqlserver/backup/auto-backup/index.md
  • docs/guides/mssqlserver/backup/logical/index.md
  • docs/guides/mssqlserver/backup/overview/index.md
  • docs/guides/mysql/backup/kubestash/application-level/index.md
  • docs/guides/mysql/backup/kubestash/auto-backup/index.md
  • docs/guides/mysql/backup/kubestash/logical/index.md
  • docs/guides/mysql/backup/kubestash/overview/index.md
  • docs/guides/postgres/backup/kubestash/application-level/index.md
  • docs/guides/postgres/backup/kubestash/auto-backup/index.md
  • docs/guides/postgres/backup/kubestash/logical/index.md
  • docs/guides/postgres/backup/kubestash/overview/index.md
  • docs/guides/postgres/monitoring/grafana-dashboard.md
  • docs/guides/qdrant/backup/logical/index.md
  • docs/guides/qdrant/backup/overview/index.md
  • docs/guides/qdrant/backup/volume-snapshot/index.md
  • docs/guides/redis/backup/kubestash/application-level/index.md
  • docs/guides/redis/backup/kubestash/auto-backup/index.md
  • docs/guides/redis/backup/kubestash/logical/index.md
  • docs/guides/redis/backup/kubestash/overview/index.md
  • docs/guides/singlestore/backup/kubestash/application-level/index.md
  • docs/guides/singlestore/backup/kubestash/auto-backup/index.md
  • docs/guides/singlestore/backup/kubestash/logical/index.md
  • docs/guides/singlestore/backup/kubestash/overview/index.md
  • docs/guides/zookeeper/backup/kubestash/auto-backup/index.md
  • docs/guides/zookeeper/backup/kubestash/logical/index.md
  • docs/guides/zookeeper/backup/kubestash/overview/index.md

- At first, you need to have a Kubernetes cluster, and the `kubectl` command-line tool must be configured to communicate with your cluster. If you do not already have a cluster, you can create one by using `Minikube` or `Kind`.
- Install `KubeDB` in your cluster following the steps [here](/docs/setup/README.md).
- Install `KubeStash` in your cluster following the steps [here](https://kubestash.com/docs/latest/setup/install/kubestash).
- Install `KubeStash` in your cluster following the steps [here](https://kubestash.com/docs/latest/setup).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Inconsistent trailing slash breaks URL normalization pattern.

This file's URL lacks the trailing slash present in all other prerequisite links across the PR. All seven other changed files use https://kubestash.com/docs/latest/setup/ and https://kubedb.com/docs/latest/setup/ (with trailing slash), but this file uses https://kubestash.com/docs/latest/setup (without trailing slash).

This inconsistency may cause routing issues or 404 errors if the domain requires normalized path formatting.

🔧 Proposed fix
- Install `KubeStash` in your cluster following the steps [here](https://kubestash.com/docs/latest/setup).
+ Install `KubeStash` in your cluster following the steps [here](https://kubestash.com/docs/latest/setup/).
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 25-25: Link text should be descriptive

(MD059, descriptive-link-text)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/guides/mssqlserver/backup/application-level/index.md` at line 25, The
KubeStash prerequisite link URL is missing a trailing slash that is present in
all other prerequisite links across the PR. In the line containing the KubeStash
setup link, add a trailing slash to the URL so it reads
https://kubestash.com/docs/latest/setup/ instead of
https://kubestash.com/docs/latest/setup to maintain consistent URL formatting
with the other seven changed files that use normalized paths with trailing
slashes.

Comment thread docs/guides/postgres/monitoring/grafana-dashboard.md Outdated
Signed-off-by: Bonusree <bonusree@appscode.com>
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit a44fe6c):

https://kubedb-v2-hugo--pr890-grafana-0v1y8dcf.web.app

(expires Thu, 25 Jun 2026 09:53:52 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 0f29ae8ae0bd54a99bf2b223b6833be47acd5943

Signed-off-by: Bonusree <bonusree@appscode.com>
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.

1 participant