meln5674 / grafana-mongodb-community-plugin

Open Source Grafana Plugin for querying MongoDB
GNU Affero General Public License v3.0
130 stars 17 forks source link

Use Grafana global variables in mongo aggregation query? #27

Open SirOlf57 opened 10 months ago

SirOlf57 commented 10 months ago

I want to use the ${__from:date:iso} and ${__to:date:iso} variables in an aggregation, but they cannot be resolved. Using my dashboard variables, e.g. like $variable, works just fine. Is it possible, and if yes, how?

meln5674 commented 10 months ago

I'm able to resolve those variables in the latest version, which version are you using, and what exact error message are you receiving?

SirOlf57 commented 10 months ago

I am using v0.2.0+rc4. Can you provide an example aggregation, which worked for you? I think that will help.

meln5674 commented 10 months ago

Take a look at this example dashboard which uses both variables specific to that dashboard, but also the two global ones you mentioned.

akshitadixit commented 2 months ago

Take a look at this example dashboard which uses both variables specific to that dashboard, but also the two global ones you mentioned.

Such a useful comment hidden right here, thanks, appreciate it 👏🏼