How to select from dynamic measurement name

We have the follow measurements:
prod-pag-ip-10-3-11-92_vertx_timers"

as you can see ip is a dynamic thing that can change. we reflect those measurements on grafana and we cant hardcode our queries as IP are going to be changed.
I read that we can use regex when querying influx for the measurements.
I tried few things but failed. perhaps you can show me the way?

in the end i need the query to be static with this: prod-pag-_vertx_timers

so i will need to modify my grafana queries according to it:

SELECT sum(“value”) FROM “prod-pag-ip-10-3-1-30_vertx_timers” WHERE time > now() - 2h GROUP BY time(5m) fill(0)

thanks.