Dynamic aggregator type using openTSDB as Data source

We want to build a panel in our dashboard that would load metrics dynamically like showing metrics 1,2,3,4 currently and after 5 mins shows only 1,3,4. For this, we have created a variable that would call our backend service to fetch the metric name and the panel will use this variable to fetch the metric data from openTSDB and populate the graph. The issue is currently it is populating using the same aggregation for all graphs, but we want it to be dynamic based on the metric. However, we are unable to dynamically populate the aggregation type for the OpenTSDB data source. Does anyone have any idea about this?

welcome @shivamgor1

So currently is the variable fetching data dynamically?

Yes it is fetching the metric name and aggregation dynamically but we are not able to use aggregation dynamically, cause we do not see any option for it in the opentsdb query

so could this maybe be more of an opentsdb question than a grafana question? maybe an opentsdb community forum?

No, I don’t think it is related to openTSDB. Opentsdb supports different aggregations, but currently, it is hardcoded in a Grafana dropdown. So instead, I want it to be populated from a Grafana variable which will be populated by calling our backend service.

1 Like