A tsquery statement has a specific structure.
SELECT [metric expression]FROM
Note the following properties of tsquery statements:
- The statement
select *is invalid.
- Tokens are case insensitive. For example,
SeLeCtare all equivalent to
- Multiple statements can be concatenated with semi-colons. Thus example 3 in the
tsquery Language topic can be written
select jvm_heap_used_mb/1024 where category=ROLE and hostname=myhost; select jvm_heap_commited_mb/1024 where category=ROLE and hostname=myhost
- The metric expression can be replaced with an asterisk (
*), as shown in example 1 of the tsquery Language topic. In that case, all metrics that are applicable for selected entities, such as
DATANODEin example 1, are returned.
- The collection can be omitted.
- The predicate can be omitted, as shown in example 4 of the tsquery Language
topic. In such cases, time series for all entities for which the metrics are appropriate
are returned. For this query you would see the
jvm_new_threadsmetric for NameNodes, DataNodes, TaskTrackers, and so on.