Charting Time-Series Data
Cloudera Manager enables you to search for a time series, chart the time-series data, group (facet) the individual time series if your search produced multiple time series, and save the results as a view.
The following sections have more details on the terminology used, how to search for time-series data, displaying chart details, editing charts, and modifying chart properties:
Terminology
- Entity
- A Cloudera Manager component that has metrics associated with it, such as a service, role, or host.
- Metric
- A property that can be measured to quantify the state of an entity or activity, such as the number of open file descriptors or CPU utilization percentage.
- Time series
- A list of (time, value) pairs that is associated with some (entity, metric) pair. For example, (datanode-1, fd_open), (hostname, cpu_percent). In more complex cases, the time series can represent operations on other time series. For example, (datanode-1 , cpu_user + cpu_system).
- Facet
- A display grouping of the dataset, shown in separate charts. By default, when a query returns multiple time series, they are displayed in individual charts. Facets allow you to display the time series in separate charts, in a single chart, or grouped by various attributes of the set of time series.
Searching for Time-Series Data
To access the charts search page, in the Cloudera Manager Admin Console, select
. You can search for a time series in the Cloudera Manager Admin Console in two ways: by selecting from a list of metrics or by constructing a tsquery statement in the Search text box.Search Method | Procedure |
---|---|
List of Metrics |
|
tsquery Statement |
|
For example, the query SELECT
jvm_heap_used_mb where clusterId = 1 could return a set of charts like
the following:
Using Context-Sensitive Variables in Charts
When editing charts from a service, role or host status or charts page, or when adding a chart to a status page, a set of context-sensitive variables will be displayed below the query box on the search page. For example, you might see similar variables for the query shown below:
select load_1, load_5, load_15 where entityName=$HOSTID $HOSTID = serv-1.my.company.com $HOSTNAME = serv-1.my.company.com $CLUSTERID = 1
Notice the $HOSTID portion of the query string. $HOSTID is a variable that will be resolved to a specific value based on the page before the query is actually issued. In this case, $HOSTID will become serv-1.my.company.com.
The chart below shows an example of the output of a similar query.
Context-sensitive variables are useful since they allow portable queries to be written. For example the query above may be on the host status page or any role status page to display the appropriate host's swap rate. Variables cannot be used in queries that are part of global views since those views have no service, role or host context.
Displaying Chart Details
When you move your mouse over a chart, its background turns gray, indicating that you can act upon it.
- Moving the mouse to a data point on the chart shows the details about that data point in a pop-up tooltip.
- Click a chart to expand it into a full-page view
with a legend for the individual charted entities as well more fine-grained
axes divisions.
- If there are multiple elements in the chart, you can check/uncheck the legend item to hide or show that element on the chart.
- Click the Close button to return to the regular chart view.
Editing a Chart
You can edit a chart from the Custom view and save it back into the same view. Editing a chart only affects the copy of the chart in the current view – if you have copied the chart into other views, those charts are not affected by your edits.
To edit a chart:
- Move the cursor over the chart, and click the blue
down arrow icon
at the top right.
- Select
Edit. This takes you to the Edit View page for the view you were at, with the chart you selected already displayed.
- Click Save to save the revised chart back to the original view.
Copying and Editing a Chart
Editing a copy of a chart is just like editing a chart in the current view, except that you can save it to another existing chart view, back to the current Custom view, or to a new chart view that you create.
- Move the cursor over the chart, and click the blue
down arrow icon
at the top right.
- Select
Edit a Copy. This opens the Chart Search page with the chart you selected already displayed.
- Do one of the following:
- Click your browser back button to return to your original chart view.
Chart Properties
By default, the time-series data retrieved by the tsquery is displayed on its own chart, using a Line style chart, a default size, and a default minimum and maximum for the Y-axis. You can change the chart type, facet the data, set the chart size, and set X- and Y-axis ranges.
Changing the Chart Type
To change the chart type, click one of the possible chart types on the left: Line, Stack Area, Bar, and Scatter.
Grouping (Faceting) Time Series
A time-series plot for a service, role, or host may actually be a composite of multiple individual time series. For example, the query SELECT jvm_heap_used_mb where clusterId = 1 returns time-series data for the JVM heap used. Each time series has hostname, role type, metric, and entity name attributes. By default each attribute is displayed all on a single chart.
Using facets, you can combine time series based their attributes. To
change the organization of the chart data, click one of the facets on the left
hand side of the Search screen. The number in parentheses indicates how many
charts will be displayed for that facet. As shown in the image below if the
serviceName facet
is selected for the JVM heap query, the time series is grouped into four charts,
one chart each for each service name. The charts for service types with multiple
roles contain multiple lines (for example, HBase, HDFS) while services that have
only one role (for example, ZooKeeper) contain just a single line.
Changing Dimensions
You can change the size of your charts by moving the Dimension slider. It moves in 50-pixel increments. If you have multiple charts, depending on the dimensions you specify and the size of your browser window, your charts may appear in rows of multiple charts.
The following chart shows the same query as the previous chart, but with
All Combined selected (which shows all
time series in a single chart) and with the Dimension slider used to expand the
chart.
Changing Axes
You can change the Y-axis range using the Y Range minimum and maximum fields.
The X-axis is based on clock time, and by default shows the last hour of
data. You can use the Time Range Selector or
a duration link () to set the time range. (See Time Line for details).