Discovering possible predicates

You can use Predicates (‘where’ clauses) to specify filters on a wide range of aspects when querying metrics. In some cases, this large selection makes it challenging to choose the right filters for the intended purpose. This topic describes a way to find out more about applicable filters and values in the context of a specific query.

In a tsquery, the main way to filter results is by defining conditions on time series entity attributes. Like metrics, the set of applicable attributes are determined by the entity type(s) being queried. The Charting Time-Series Data topic describes this data model in more detail.

You can find more information in the following sections of the tsquery Language topic:

The chart facets displayed are the attributes, while selecting a facet shows one chart for each currently valid value. For more information, see Charting Time-Series Data and the following figures:

In addition to the above approaches, you can also use the Cloudera Manager API to request the same information from a running cluster as follows:
  • Mapping of entity types to the metrics they have, as a JSON document: GET /timeseries/schema (The response is large, approximately 50 MB.) This further clarifies the relationship between entity types, attributes, and metrics, while providing insight into the metrics applicable to each entity type.
  • A detailed explanation of attributes (similar to the Time Series Attributes table): GET /timeseries/entityTypeAttributes.
  • Definitions of the entity types referred to in the schema document, along with applicable attribute names (similar to the Time Series Entities and their Attributes table): GET /timeseries/entityTypes

The results obtained from the API include all entity types and attributes tracked by the running cluster, including those added by service integrations.