VictoriaMetrics / grafana-datasource

Grafana Plugin for VictoriaMetrics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Builder mode's Metric Dropdown Shows "No Options Found" When Custom Query Parameters Are Configured

bdschaap opened this issue · comments

Exploring a VictoriaMetrics data source in Builder mode within Grafana shows "No Options Found" in the Metric dropdown when "Custom query parameters" are configured. This prevents using the Builder mode to construct queries. However, switching to Code mode and entering a MetricsQL query works.

Steps to reproduce -

  1. Add VictoriaMetrics data source to Grafana
  2. Configure "Custom query parameters" such as the following -
    extra_filters[]={cluster_name="mycluster"}
  3. Save
  4. Explore the data source
  5. Notice that the query is in Builder mode by default.
  6. The Metric dropdown shows "No Options Found" when you click on it. The expectation is that It should list metrics available similar to how it would work if "Custom query parameters" weren't configured.
  7. Switch to Code mode
  8. Enter a MetricsQL query and click "Run query".
  9. Results are returned as expected.

I'm using Grafana 10.1.5 and victoriametrics datasource plugin 0.4.0.

@Loori-R could you please take a look?

Hi, @bdschaap

Thanks for detailing the issue with VictoriaMetrics in Grafana. I couldn't reproduce the problem on my end, but I suggest the following:

Parameter Accuracy: Please ensure that extra_filters[]={cluster_name="mycluster"} is correctly specified in the "Custom query parameters" settings. Errors in formatting can lead to incorrect processing of the request.

Network Traffic Analysis: Could you check the Network tab in your browser's developer tools for the values?... request with extra_filters[] We need to see if the response {status: "success", data: []} is returned from the server, which would indicate successful processing of the request.

This will help us understand whether the problem is related to specific settings in your environment or if it is a broader issue. I would appreciate any additional information you can provide after these checks.

Thanks!