/metrics/{metricId}/chart
GET
Available Since: 3.6
Query a metric with the given parameters and return the results as a image, possibly base64 encoded and wrapped in a HTML wrapper. This resource provides a visual representation of historical metric data in a format that can be viewed off-line, embedded into a document or written to a file for subsequent use. The production of the chart image is done by the server.
Parameters
name | description | type | default |
---|---|---|---|
metricId | The ID of the metric to query. A list of valid metricIds can be found at resource MetricsResource. | path | |
instanceType | The product instance types to match. If not specified all instance types are matched. To match more than one instance type, specify this parameter multiple times. A list of valid instance types will be returned in an error message if an invalid value is provided. | query | |
instanceGroup | The product instance groups to match. If not specified all instance groups are matched. This parameter is currently not implemented. | query | |
instanceLocation | The product instance locations to match. If not specified all instance locations are matched. To match more than one location, specify this parameter multiple times. Valid locations are contained in the location attribute of the result from resource InstancesResource. | query | |
instanceHostname | The product instance hostnames to match. If not specified all instance hostnames are matched. To matched more than one hostname, specify this parameter multiple times. Valid hostnames are contained in the hostname attribute of the result from resource InstancesResource. | query | |
instanceVersion | The product instance versions to match or null to match all instance versions. Valid version strings are contained in the version attribute of the result from resource InstancesResource. | query | |
instance | The specific product instance IDs to match. If not specified all instances are used. Valid instance IDs are contained in the id attribute of the result from resource InstancesResource. | query | |
startTime |
The start time for the requested data. This value may be in a relative form which will be calculated relative to endTime, or it may be in an absolute form using ISO8601 format. Relative form uses the syntax: -N[mhdwMy] which is interpreted to mean N time-units before endTime. Absolute form uses the ISO8601 syntax of YYYY-MM-DDThh:mm:ss where you can specify a partial date by omitting fields on the right (without skipping any fields). For example, 2013-01-01 is a valid timestamp that mean midnight on January 1st 2013. |
query | -24h |
endTime |
The end time for the requested data. If not specified, an endTime of 'now' is used. This value may be in a relative form which will be calculated relative to now, or it may be in an absolute form using ISO8601 format. Relative form uses the syntax: -N[mhdwMy] which is interpreted to mean N time-units before now where now is the current time on the Metrics Engine server. Absolute form uses the ISO8601 syntax of YYYY-MM-DDThh:mm:ss where you can specify a partial string by omitting fields on the right (without skipping any fields). For example, 2013-01-01 is a valid timestamp that mean midnight on January 1st 2013. |
query | |
maxIntervals | The maximum number of time intervals to include in the result. If maxIntervals is 1, all data over the requested time range is reduced to a single number. Otherwise the time range is evenly divided into maxIntervals intervals. A time range farther in the past will be forced to use data with less time granularity, so it is possible that the resulting chart will have fewer than maxIntervals data points, but it will never have more. | query | 1 |
maxTruncatedIntervals | The maximum number of incomplete time intervals to truncate, if any. If null, a max of 5 min worth of intervals or 20% of the total intervals may be truncated. | query | |
statistic |
The statistic to query on. If not specified, the default statistic (count for CountMetrics or average or all others) will be used. For count-valued metrics, the statistic specification may include a rate conversion as follows: statistic=count;per:s   Count per Second statistic=count;per:m   Count per Minute statistic=count;per:h   Count per Hour Valid statistic values are contained in the statistic attribute of the result from resource MetricResource. |
query | |
dimension |
Filter the results to only include data related to the specified Dimension/value pairs. If not specified, all dimension values for all dimensions of the metric will be present in the chart. A valid dimension filter is specified as: dimension=application-name:SSO Application,ERP Application All values for a dimension must be provided in the same query parameter. To filter on more than one dimension, use more than one query parameter. Valid dimension names and values are contained in the dimensions attribute of the result from resource MetricResource. |
query | |
pivot |
When specified a pivot will separate the metric along distinct dimension values. If not specified, all dimension values are aggregated together. A valid pivot name for a metric includes all of the metrics dimensions plus 'instance'. Pivot by instance will separate the values by monitored server. Histogram-valued metrics may also have 'histogram' as a valid pivot, which will split the result by histogram bucket. Valid dimension names are contained in the dimensions attribute of the result from resource MetricResource. |
query | |
topN | when specified the data series returned by the metric query are further filtered to include only the top/bottom series as sorted by average series value. If the value is greater than 0, the series with the highest averages are returned. If the value is less than 0, the series with the lowest averages are returned. Only series with an average greater than 0 are returned; | query | 0 |
hint |
Query hints to use. Must be one of the following values:
|
query | |
width | The desired width of the chart image. | query | 800 |
height | The desired height of the chart image. | query | 600 |
showLegend | Whether to include a legend on the chart. | query | true |
title | If provided, the value of this parameter will be the chart title. If not provided, the metric name will be the chart title. | query | |
subTitle | If provided, the value of this parameter will be a chart subtitle. If not provided there is no subtitle. | query | |
includeEmptySeries | If present data series with no valid values will be excluded from the chart. This parameter is currently not implemented. | query | false |
tz | The timezone to use labeling the resulting chart's time axis when dateFormatStr is provided. | query | GMT |
dateFormat | If provided, the value of this parameter is used as a DateFormat string for timestamp labels on the time axis of the chart. | query | |
useLogScale | If true the vertical scale will be logarithmic. | query | |
style |
Set JFreeChart specific formatting controls. The value of this parameter is a semi-colon separated list of key/value pairs where the key/value pair is separated by a colon. Valid values are:
|
query |
Response Body
element: | (custom) |
media types: | image/jpeg image/png text/html |
Bytes that corresponds to the image, or a HTML page with the image base64 encoded in it.
Status Codes
code | description |
---|---|
200 | Success |
400 | Invalid parameter |
500 | Internal error |
404 | Metric not found |