We have three series with the following tag and measurement name :
MeasurementA : host_name = H1, service_description = S1
MeasurementA : host_name = H1
MeasurementB : host_name = H1
I would like to query all points of measurement A and B, where host_name is H1 and that the service_description tag is not present.
@fpeyre it's possible with negation and regex:
SELECT * FROM /Measurement.*/ WHERE host_name = 'H1' AND service_description !~ /.*/
Note that in order to select from multiple measurements, they must share an identical set of field keys. Otherwise the system will give an error ERR: unknown field or tag name in select clause: <fkey> where <fkey> will be the field key that does not exist on all measurements matched by the query.
Just to document on this issue, had the same problem and using /.*/ did not work, what did work was using /./
Most helpful comment
Just to document on this issue, had the same problem and using /.*/ did not work, what did work was using /./