Does influx support regexp (or similar) please?

Dear All,

I wish to have some query like mysql:
select * from api where hostname like ‘thw-dv-lamp-01%’ limit 1;

it failed with:
ERR: error parsing query: found like, expected ; at line 1, char 34

Please shed some light.

Apologize if the question is too newbie.

Thanks a lot in advance

would you please shed some light?
thanks a lot in advance

Sure, like this:

SELECT mean(“usage_idle”) AS “mean_usage_idle” FROM “telegraf”.“autogen”.“cpu” WHERE time > now() - 1h AND (“host”=~/node/) AND “cpu”=‘cpu-total’ GROUP BY host
name: cpu
tags: host=node001
time mean_usage_idle


1526047229315210467 99.41784986722456

name: cpu
tags: host=node01
time mean_usage_idle


1526047229315210467 86.51526314639102

name: cpu
tags: host=node02
time mean_usage_idle


1526047229315210467 88.25015140382432

name: cpu
tags: host=node03
time mean_usage_idle


1526047229315210467 85.26376674950833

It is possible but you should be careful using regex if you have high cardinality in your database. IF you have a lot of tags and values then regex can impact the server significantly.

https://docs.influxdata.com/influxdb/v1.5/query_language/data_exploration/#regular-expressions

@jbbd and @philb: thanks a lot indeed