InfluxDB Datasource - choose tags before measurement when selecting?

Question regarding the InfluxDB datasource and the method to query some time series. I have lots of measurements which may apply to some hosts that we collect metric data for, but not others. For instance, JVM metrics. Say 3/10 clients send JVM data, the other 7 do not. My measurement may be something like jvm_memory but I can’t pre-filter the measurements with a tag for the host that is running a JVM. I have to sift through hundreds of measurements to find jvm_memory, after which I can filter to the 3 hosts that I already know can run it. Is there any way to pre-define some filters before looking for the measurement I want?

Example:


Let’s say the http measurement is only a valid measurement for 1 host, say hostname01. I can’t select a WHERE filter with host = ‘hostname01’ and THEN select the measurements that apply. Instead of I have to see every single measurement for all hosts and find what I need, then apply the filter when it’s less needed. Any solutions?