Graph with variable metrics

I’m using telegraf, elasticsearch and grafana to monitor a postgres database server.
I have several metrics, specific for single databases, and I want to put all these metrics in a single graphic.
All this works as a charm, but if I create a new database I need to add the specific metric to the graph.
There is a way to have dinamic metrics in a graph?

Thank you :slight_smile:

Hi,

You should be able to work that out. Can you show me your query (screenshot)?

Marcus


Here you can see my template vars. $DB is a list of postgres databases.


This is my graph. Is it possible to have dinamics metrics (one for DB)? The target is that if I add a DB in postgres, the graph show the database matrics automatically.

(or maybe I’m figure it out the wrong way)

Thank you

Hi,

Please make sure that your Query Options for template variables are configured with correct Refrech setting, i.e. On Dashboard Load (I think).

Marcus