Metric to access. For the list of metrics, refer to the Metric Definitions page on your dashboard (on the navigation bar, click Help > Metric Definitions); click or hover over the metric you want to see the metric name, which appears after the #m= part of the URL.
sample
(required if targetpoints not specified; n/a otherwise) Sample interval (time between points returned), in milliseconds. WARNING: A small value over a long time period is expensive. The minimum value is 5000 (5 seconds). For a query that lasts a few hours, we recommend a value of 10000 (10 seconds).
targetpoints
(required if sample not specified; n/a otherwise) Target number of points to return. The actual number of points returned can be greater or fewer depending on the sample size that is cached.
ms
(optional, default=20) Maximum Series to return. If the number of series exceeds this value, we show the top n series and include the remaining series as aggregates: sum_of_the_others, max_of_the_others, average_of_all_matched_series.
nohostsreporting
(optional, default=off) Include or omit the hostsreporting in the response. To omit hostsreporting, set to 1.
omitpoints
(optional, default=off) Include or omit datapoints in the response. To omit all datapoints in the response, set to all.
downsampler
(optional, default=off) Flag to split a single series into percentiles by time. To split a series, set to percentile. NOTE: The percentile downsampler applies only to queries that would otherwise return a single series.
format
(optional, default=json) Format. For the fastest API performance, use the JSON format (lowercase json). To get the query in CSV format, set to (lowercase) csv.
omitaggregates
(optional, default=off) Include or omit aggregate series—sum_of_the_others, max_of_the_others, and average_of_all_matched_series—in the response. To omit aggregate series, set to 1.
dataonly
(optional, default=off) Include or omit progress updates and other performance instrumentation data in the response. To omit progress updates and instrumentation data, set to 1.
Metrics Breakdowns and Filters
You can add series breakdowns and/or filters to the metrics’ requests.
To get the breakdown of all the results, use * for the querystring value.
To specify a filter, use the specific string.
For example, to breakdown results by hosts, add the querystring &h=*.
To filter by a given hostname, for example, “my-host”, add the querystring &h=my-host.
To perform a regex match, add the querystring &h=/.*/.
You can specify multiple breakdowns.
For example, for all jobs on a specific host, my-host, add the querystring, &h=my-host&j=*.
The table describes the breakdowns and filters options.
querystring key
description
h
host
u
user
q
queue
c
control domain
j
job sequence id
tt
task type
t
task
The only valid value is *. This querystring key cannot be used by itself. It must be used with another filter. For example, to get all the tasks for a job, use &j={JOBID}&t=*.
d
device
Data Format of the Metrics API
The Pepperdata REST API metrics resource returns a single JSON object, defined as follows:
expectedCount: Expected number of progress chunks.
(omitted if dataonly=1) progress: Array of progress updates during the query runtime.
(omitted if dataonly=1) instrumentation: Debug information about the query, such as timing numbers.
data: Data payload.
allseries: Array of timeseries returned timeseries.
{timeseries}: timeseries object inside allseries.
dataPoints: Array of arrays of the form [[timestamp, value], [timestamp,value] ...]]
summaryStats: Object that contains the summaries for each series, such as area, average (mean), min, p05, max, and p95.
name: Object that contains name details about the series; varies by breakdown/filter.
seriesId: Unique name for this series.
sampleMillis: Distance between points, in milliseconds.
startTimeMillis: Start timestamp.
hostsReporting: Object with the number of hosts that have finished reporting; helps in determining whether data collection is complete.
expectedHosts: Number of hosts expected.
hostCounts: Array of arrays that contain the timestamp and number of hosts reported at that time.
Example (Python): Metrics API
The commented Python example shows how to make an HTTP request to the Pepperdata REST API resource for retrieving the Pepperdata dashboard metrics data.