Skip to content

Resource Control dashboard Failed Query OPM panel uses undefined instance variable #69104

@YuhaoZhang00

Description

@YuhaoZhang00

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Open the TiDB Resource Control Grafana dashboard.
  2. Use the TiDB Instance template variable to select a specific TiDB instance.
  3. Open the Query Summary row and inspect the Failed Query OPM panel.
  4. Check the panel query in the dashboard JSON or jsonnet source:
sum(increase(tidb_server_execute_error_total{
  k8s_cluster="$k8s_cluster",
  tidb_cluster="$tidb_cluster",
  instance=~"$instance",
  resource_group=~"$resource_group"
}[1m])) by (type, instance, resource_group)

The Resource Control dashboard defines the TiDB instance variable as tidb_instance, not instance.

Affected dashboard sources:

  • pkg/metrics/grafana/tidb_resource_control.jsonnet
  • pkg/metrics/nextgengrafana/tidb_resource_control_with_keyspace_name.jsonnet

2. What did you expect to see? (Required)

The Failed Query OPM panel should follow the dashboard's TiDB Instance selector and use:

instance=~"$tidb_instance"

3. What did you see instead (Required)

The panel uses the undefined Grafana variable $instance:

instance=~"$instance"

As a result, the panel does not correctly follow the TiDB instance selector and may show no data or use an incorrect instance filter.

4. What is your TiDB version? (Required)

This is a Grafana dashboard configuration bug in the current TiDB dashboard source.

Observed on current master dashboard source:

e370684058 lightning: extend duplicate resolution wait (#69084)

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributionThis PR is from a community contributor.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions