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
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.
@jbbd and @philb: thanks a lot indeed