I'm using prometheus and grafana to monitor the neo4j database cluster.I wanted to create a dynamic dashboard based on the DBNAME as a variable. Below is the query I'm using to populate a panel. Here the graph_db is the DBName and only this changes for multiple databases. Is there a way to change the metric name dynamically using variable.
neo4j_graph_db_transaction_last_closed_tx_id_total{job='$job', instance=~"$neo4j_instance"}
--> For graph_db
neo4j_system_transaction_last_closed_tx_id_total{job='$job', instance=~"$neo4j_instance"}
--> For system