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

dashboard selects wrong cluster "cluster-name" on refresh #20

Open
maaft opened this issue Oct 11, 2024 · 0 comments
Open

dashboard selects wrong cluster "cluster-name" on refresh #20

maaft opened this issue Oct 11, 2024 · 0 comments

Comments

@maaft
Copy link

maaft commented Oct 11, 2024

The issue is, that in regex "cluster" is used instead of "exported_cluster".

This leads to:

  1. no automatic cluster selection when namespace is selected
  2. if entered manually, on next data refresh the cluster-name is lost again

Required dashboard change (regex: change "exported" to "exported_cluster")

{
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "cnpg_collector_up{namespace=~\"$namespace\"}",
        "description": "CNPG Cluster",
        "hide": 0,
        "includeAll": false,
        "label": "Cluster",
        "multi": false,
        "name": "cluster",
        "options": [],
        "query": {
          "query": "cnpg_collector_up{namespace=~\"$namespace\"}",
          "refId": "PrometheusVariableQueryEditor-VariableQuery"
        },
        "refresh": 2,
        "regex": "/\\bexported_cluster\\b=\"(?<text>[^\"]+)/g",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      ``` 
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

No branches or pull requests

1 participant