Skip to content

monitoring: redesign Grafana dashboards#428

Open
bootjp wants to merge 1 commit intomainfrom
feature/dashborard
Open

monitoring: redesign Grafana dashboards#428
bootjp wants to merge 1 commit intomainfrom
feature/dashborard

Conversation

@bootjp
Copy link
Owner

@bootjp bootjp commented Mar 24, 2026

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request undertakes a comprehensive redesign of the Grafana monitoring dashboards for Elastickv. The goal is to provide operators with more focused and actionable insights into the system's health, performance, and consensus state. By introducing specialized dashboards for request health and Raft status, alongside a refined cluster overview, the changes aim to streamline monitoring workflows and facilitate quicker identification and diagnosis of issues.

Highlights

  • Dashboard Redesign: The Grafana monitoring dashboards for Elastickv have been comprehensively redesigned and reorganized to provide more focused and actionable insights. This includes significant updates to the 'Elastickv Cluster Overview' and the introduction of new dashboards 'Elastickv Request Health' and 'Elastickv Raft Status'.
  • Enhanced Metric Granularity: New templating variables for 'node_id', 'group', 'operation', and 'table' have been added across the dashboards, allowing for more granular filtering and analysis of metrics related to DynamoDB requests and Raft consensus state.
  • Consolidation and Removal: The 'elastickv-dynamodb-summary.json' dashboard has been removed, with its relevant functionalities likely consolidated into the new 'Elastickv Request Health' dashboard.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request significantly refactors and updates the Grafana monitoring dashboards for Elastickv, enhancing visibility into both DynamoDB-compatible API request health and Raft control-plane status. The README.md file has been updated to reflect the new metrics and dashboard organization. The elastickv-cluster-overview.json dashboard now includes more detailed metrics like system/user error splits, in-flight requests, and comprehensive Raft state, along with templating for group and node IDs. The elastickv-cluster-summary.json dashboard has been transformed into Elastickv Request Health, focusing on DynamoDB request throughput, latency, errors, and per-table activity, introducing templating for node ID, operation, and table. The elastickv-dynamodb-summary.json dashboard has been removed. Finally, the elastickv-raft-status.json dashboard provides a more granular view of Raft control-plane status, including per-node index snapshots, backlog, and FSM pending, also with templating for group and node IDs. A suggestion was made to rename the elastickv-cluster-summary.json file to elastickv-request-health.json to align with its new title and description.

Comment on lines +53 to +61
- `monitoring/grafana/dashboards/elastickv-cluster-summary.json`
- `monitoring/grafana/dashboards/elastickv-raft-status.json`
- `monitoring/grafana/provisioning/`
- `monitoring/docker-compose.yml`

The provisioned dashboards are organized by operator task:

- `Elastickv Cluster Overview` is the landing page for leader identity, cluster-wide latency/error posture, and per-node Raft health
- `Elastickv Request Health` is the DynamoDB/API drilldown for slow operations, noisy nodes, and hot/erroring tables
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For consistency and clarity, consider renaming the dashboard file elastickv-cluster-summary.json to elastickv-request-health.json. This would align the filename with its new title Elastickv Request Health and the description provided in this README. You would also need to update this file to reflect the new name.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR redesigns the Grafana monitoring dashboards under monitoring/grafana/dashboards/ to better support operator workflows, splitting “overview” vs. “request health” vs. “raft control-plane” drilldowns and adding richer per-node/per-table breakdowns.

Changes:

  • Redesign Raft dashboard into a control-plane focused view with per-node index/contact snapshots and node filtering.
  • Redesign cluster summary into a DynamoDB/API request health dashboard with node/operation/table templating and top offenders tables.
  • Update cluster overview into an operator landing page and remove the legacy DynamoDB summary dashboard; update README dashboard documentation.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
monitoring/grafana/dashboards/elastickv-raft-status.json Reworked Raft status dashboard: new layout, node filtering, leader/membership tables, per-node index snapshot, and additional time series.
monitoring/grafana/dashboards/elastickv-dynamodb-summary.json Removed legacy DynamoDB summary dashboard JSON.
monitoring/grafana/dashboards/elastickv-cluster-summary.json Repurposed into “Request Health” dashboard with node/operation/table variables and new panels for error/latency/table hot spots.
monitoring/grafana/dashboards/elastickv-cluster-overview.json Updated “Cluster Overview” landing page with node/group templating, revised KPI stats, and a per-node Raft health snapshot table.
README.md Updated monitoring section to reflect new dashboard set and intent.

Comment on lines 176 to 178
"editorMode": "code",
"expr": "count by (group) (elastickv_raft_member_present{job=\"elastickv\",group=~\"$group\"} * on(group, node_id, node_address) group_left() (elastickv_raft_local_state{job=\"elastickv\",group=~\"$group\",state=\"leader\"} == 1))",
"instant": false,
"expr": "max by (group) (clamp_min(elastickv_raft_last_contact_seconds{job=\"elastickv\",group=~\"$group\",node_id=~\"$node_id\"}, 0))",
"legendFormat": "{{group}}",
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

elastickv_raft_last_contact_seconds uses -1 as a sentinel for unknown/invalid values (see monitoring/raft.go). Clamping to 0 here turns “unknown” into “0s” (healthy) and can mask missing telemetry. Consider keeping the raw value and using a value mapping for -1, or handling unknown explicitly in the PromQL.

Copilot uses AI. Check for mistakes.
{
"datasource": null,
"editorMode": "code",
"expr": "max by (group, node_id, node_address) (clamp_min(elastickv_raft_last_contact_seconds{job=\"elastickv\",group=~\"$group\",node_id=~\"$node_id\"}, 0))",
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

This series clamps elastickv_raft_last_contact_seconds to 0, but the exporter uses -1 to mean “unknown”. That makes missing/invalid contact data look like a real 0s value. Prefer leaving the sentinel value and adding a value mapping, or converting unknowns to null/NaN so they’re visually distinct.

Suggested change
"expr": "max by (group, node_id, node_address) (clamp_min(elastickv_raft_last_contact_seconds{job=\"elastickv\",group=~\"$group\",node_id=~\"$node_id\"}, 0))",
"expr": "max by (group, node_id, node_address) (elastickv_raft_last_contact_seconds{job=\"elastickv\",group=~\"$group\",node_id=~\"$node_id\"})",

Copilot uses AI. Check for mistakes.
Comment on lines +363 to 365
"expr": "max(clamp_min(elastickv_raft_last_contact_seconds{job=\"elastickv\",group=~\"$group\",node_id=~\"$node_id\"}, 0))",
"legendFormat": "max last contact",
"range": true,
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

elastickv_raft_last_contact_seconds uses -1 as “unknown”. Clamping to 0 here makes unknown contact look like 0s and can hide scrape/telemetry issues. Consider removing the clamp and adding a value mapping for -1 (or filtering unknowns explicitly) so operators can distinguish “unknown” from “0s”.

Copilot uses AI. Check for mistakes.
{
"datasource": null,
"editorMode": "code",
"expr": "max by (group, node_id, node_address) (clamp_min(elastickv_raft_last_contact_seconds{job=\"elastickv\",group=~\"$group\",node_id=~\"$node_id\"}, 0))",
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

The table clamps elastickv_raft_last_contact_seconds to 0, but the exporter uses -1 as a sentinel for unknown/invalid values. This makes missing data indistinguishable from a real 0s value in the snapshot. Prefer keeping -1 with a value mapping, or translating unknowns to null so they render as “unknown”/blank.

Suggested change
"expr": "max by (group, node_id, node_address) (clamp_min(elastickv_raft_last_contact_seconds{job=\"elastickv\",group=~\"$group\",node_id=~\"$node_id\"}, 0))",
"expr": "max by (group, node_id, node_address) (elastickv_raft_last_contact_seconds{job=\"elastickv\",group=~\"$group\",node_id=~\"$node_id\"} unless elastickv_raft_last_contact_seconds{job=\"elastickv\",group=~\"$group\",node_id=~\"$node_id\"} == -1)",

Copilot uses AI. Check for mistakes.
Comment on lines +67 to 68
"expr": "max by (group) (elastickv_raft_term{job=\"elastickv\",group=~\"$group\",node_id=~\"$node_id\"})",
"legendFormat": "{{group}}",
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

The panel title implies this is the group’s current raft term, but the query is max by (group)(elastickv_raft_term{...}), which can surface a higher term from a non-leader observer during elections/partitions. Either scope the term to the leader (as the old dashboard did) or rename the panel to something like “Max Observed Term” to match the query semantics.

Copilot uses AI. Check for mistakes.
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.

2 participants