Returns a JSON representation of a dictionary containing logical plan, physical plan,
execution state, scheduler location and TMaster location for a topology, as described above.
TMasterLocation is the location of the TMaster, including its host,
port, and the heron-shell port that it exposes.

Returns a JSON map of instances of the topology to their respective metrics.
To filter instances returned use the instance parameter discussed below.

Note that these metrics come from TMaster, which only holds metrics
for last 3 hours minutely data, as well as cumulative values. If the interval
is greater than 10800 seconds, the values will be for all-time metrics.

Parameters

cluster (required) — The cluster in which the topology is running

environ (required) — The environment in which the topology is running

topology (required) — The name of the topology

component (required) — Component name

metricname (required, repeated) — Names of metrics to fetch

interval (optional) — For how many seconds, the metrics should be fetched for (max 10800 seconds)

instance (optional) — IDs of the instances. If not present, return for all the instances.

Returns a JSON map of instances of the topology to their respective metrics timeline.
To filter instances returned use the instance parameter discussed below.

The difference between this and /metrics endpoint above, is that /metrics will report
cumulative value over the period of interval provided. On the other hand, /metricstimeline
endpoint will report minutely values for each metricname for each instance.

Note that these metrics come from TMaster, which only holds metrics
for last 3 hours minutely data, as well as cumulative all-time values. If the starttime
is older than 3 hours ago, those minutes would not be part of the response.

Parameters

cluster (required) — The cluster in which the topology is running

environ (required) — The environment in which the topology is running

topology (required) — The name of the topology

component (required) — Component name

metricname (required, repeated) — Names of metrics to fetch

starttime (required) — Start time for the metrics (must be within last 3 hours)

endtime (required) — End time for the metrics (must be within last 3 hours,
and greater than starttime)

instance (optional) — IDs of the instances. If not present, return for all the instances.

Executes the metrics query for the topology and returns the result in form of minutely timeseries.
A detailed description of query language is given below.

Note that these metrics come from TMaster, which only holds metrics
for last 3 hours minutely data, as well as cumulative all-time values. If the starttime
is older than 3 hours ago, those minutes would not be part of the response.

Parameters

cluster (required) — The cluster in which the topology is running

environ (required) — The environment in which the topology is running

topology (required) — The name of the topology

starttime (required) — Start time for the metrics (must be within last 3 hours)

endtime (required) — End time for the metrics (must be within last 3 hours,
and greater than starttime)

Metrics queries are useful when some kind of aggregated values are required. For example,
to find the total number of tuples emitted by a spout, SUM operator can be used, instead
of fetching metrics for all the instances of the corresponding component, and then summing them.

Terminology

Univariate Timeseries — A timeseries is called univariate if there is only one set
of minutely data. For example, a timeseries representing the sums of a number of timeseries
would be a univariate timeseries.

Multivariate Timeseries — A set of multiple timeseries is collectively called multivariate.
Note that these timeseries are associated with their instances.

Operators

TS

TS(componentName, instance, metricName)

Example:

TS(component1, *, __emit-count/stream1)

Time Series Operator. This is the basic operator that is responsible for getting metrics from TMaster.
Accepts a list of 3 elements:

componentName

instance - can be “*” for all instances, or a single instance ID

metricName - Full metric name with stream id if applicable

Returns a univariate time series in case of a single instance id given, otherwise returns
a multivariate time series.

DEFAULT

DEFAULT(0, TS(component1, *, __emit-count/stream1))

If the second operator returns more than one timeline, so will the
DEFAULT operator.

DEFAULT(100.0, SUM(TS(component2, *, __emit-count/default))) <--

Second operator can be any operator

Default Operator. This operator is responsible for filling missing values in the metrics timeline.
Must have 2 arguments

First argument is a numeric constant representing the number to fill the missing values with

Second one must be one of the operators, that return the metrics timeline

Returns a univariate or multivariate time series, based on what the second operator is.

SUM

Sum Operator. This operator is used to take sum of all argument time series. It can have any number of arguments,
each of which must be one of the following two types:

Numeric constants, which will fill in the missing values as well, or

Operator, which returns one or more timelines

Returns only a single timeline representing the sum of all time series for each timestamp.
Note that “instance” attribute is not there in the result.

MAX

MAX(100, TS(component1, *, metric1))

Max Operator. This operator is used to find max of all argument operators for each individual timestamp.
Each argument must be one of the following types:

Numeric constants, which will fill in the missing values as well, or

Operator, which returns one or more timelines

Returns only a single timeline representing the max of all the time series for each timestamp.
Note that “instance” attribute is not included in the result.

PERCENTILE

PERCENTILE(99, TS(component1, *, metric1))

Percentile Operator. This operator is used to find a quantile of all timelines retuned by the arguments, for each timestamp.
This is a more general type of query similar to MAX. Note that PERCENTILE(100, TS...) is equivalent to Max(TS...).
Each argument must be either constant or Operators.
First argument must always be the required Quantile.

RATE

Rate Operator. This operator is used to find rate of change for all timeseries.
Accepts a only a single argument, which must be an Operators which returns univariate or multivariate time series.
Returns univariate or multivariate time series based on the argument, with each timestamp value
corresponding to the rate of change for that timestamp.