Skip to main content
Version: QB14

Query Grid Measurements

Grid measurements can be fetched from REST API.

Available Functions

The base URI for grid measuremetns REST API is:

/rest/grid/measurements

The support functions include:

URIDescriptionParams
/rest/grid/measurements/helpGet help for all available functionsNO PARAMS
/rest/grid/measurements/versionGet current version for the measurements related REST APINO PARAMS
/rest/grid/measurementsQuery for the measurements you want* source - QUERY_PARAM Specify the node you want to query. If not specifed, then all nodes will be used. * period - QUERY_PARAM Specify the time range you want to query. by default, period is LAST_HOUR, this param can be one of: LAST_HOUR, LAST_2_HOURS, LAST_4_HOURS, LAST_DAY, LAST_WEEK, LAST_MONTH * start_time - QUERY_PARAM Specify the start time you want to query. If not specified, then an hour ago of to_date will be used. * end_time - QUERY_PARAM Specify the end time you want to query. If not specified, then current time will be used. * metric - QUERY_PARAM Specify the metric name you want to query. See below section for all available metric names * date_pattern - QUERY_PARAM Specify the date pattern you are using for from_date and to_date. By default, ISO 8601 is used.

Below, we'd like to give some examples for how to query the measurements:

With no params

If you call below query, QuickBuild will return all measurements collected from all nodes in the last one hour.

/rest/grid/measurements

Query for a specified node

Below query will return all measurements from myagent:8811 in the last one hour.

/rest/grid/measurements?source=myagent:8811

Query for a specified metric

Below query will return measurements of disk usage for all nodes in the last one hour.

/rest/grid/measurements?metric=disk.usage

Query for a specified time range

Below query returns all measurements for all nodes in the last 2 hours.

/rest/grid/measurements?period=LAST_2_HOURS

Below query returns all measurements for all nodes from time: 2013-02-25T09:47:00+08:00, note by default, you need format your time in ISO8601 format, that is, in pattern: yyyy-MM-dd'T'HH:mm:ss.SSSZ, we will give a custom date pattern in later sample.

/rest/grid/measurements?start_time=2013-02-25T09:47:00.000%2B08:00

Below query returns all measurements for all nodes in a specified time range with a custom date format pattern:

/rest/grid/measurements?start_time=2013/02/25+09:47&end_time=2013/02/27+09:47&date_pattern=yyyy/MM/dd+HH:mm

Example return result

For all query above, below is an example return result:

<list>
<com.pmease.quickbuild.model.MeasurementDataR00>
<id>350</id>
<timestamp>1361854800000</timestamp>
<source>Zhenyu-MBP.local:8811</source>
<metricName>memory.usage</metricName>
<value>0.743398666381836</value>
</com.pmease.quickbuild.model.MeasurementDataR00>
<com.pmease.quickbuild.model.MeasurementDataR00>
<id>335</id>
<timestamp>1361854800000</timestamp>
<source>Zhenyu-MBP.local:8810</source>
<metricName>web.rpc.oneMinuteRate</metricName>
<value>10.3903417298681</value>
</com.pmease.quickbuild.model.MeasurementDataR00>
<com.pmease.quickbuild.model.MeasurementDataR00>
<id>334</id>
<timestamp>1361854800000</timestamp>
<source>Zhenyu-MBP.local:8810</source>
<metricName>web.rpc.fiveMinuteRate</metricName>
<value>8.90793420070343</value>
</com.pmease.quickbuild.model.MeasurementDataR00>
</list>

Here, timestamp is the milliseconds in Java time (the time from midnight, January 1, 1970 UTC.), you can simply create your own Date instance by new Date(timestamp) in Java.

Available Measurement Metrics

Below table shows all available measurement metrics:

Virtual Machine Measurements

Metric IdMetric NameApplied to
jvm.memoryUsageVirtual Machine :: Memory UsageAll Nodes
jvm.heapUsageVirtual Machine :: Heap UsageServer Only
jvm.gcRunsVirtual Machine :: GC RunsServer Only
jvm.gcTimeVirtual Machine :: GC TimeServer Only
jvm.threadCountVirtual Machine :: Thread CountServer Only

CPU Measurements

Metric IdMetric NameApplied to
cpu.totalUsageCPU :: Total UsageAll Nodes

Physical Memory Measurements

Metric IdMetric NameApplied to
memory.usagePhysical Memory :: Memory UsageServer Only

Disk Measurements

Metric IdMetric NameApplied to
disk.usageDisk :: UsageAll Nodes

Network Measurements

Metric IdMetric NameApplied to
network.txBytesNetwork :: txBytesServer Only
network.rxBytesNetwork :: rxBytesServer Only

Swap Measurements

Metric IdMetric NameApplied to
swap.usageSwap :: UsageServer Only

Resource Measurements

Metric IdMetric NameApplied to
resources.percentageResource :: Used%Server Only
resources.freesResource :: FreesServer Only
resources.usedResource :: UsedServer Only

Build Requests Measurements

Metric IdMetric NameApplied to
buildrequests.processingsTotalBuild Requests :: Processings TotalServer Only
buildrequests.waitingsTotalBuild Requests :: Waitings TotalServer Only
buildrequests.processedTotalBuild Requests :: Processed TotalServer Only
buildrequests.processingsBuild Requests :: Processings on NodeAll Nodes
buildrequests.waitingsBuild Requests :: Waitings on NodeAll Nodes

Builds Measurements

Metric IdMetric NameApplied to
builds.totalBuilds :: Total BuildsServer Only
builds.failedBuilds :: Failed BuildsServer Only
builds.successfulRateBuilds :: Successful RateServer Only
builds.averageDurationBuilds :: Average DurationServer Only
builds.averageWaitingDurationBuilds :: Average Waiting DurationServer Only

Steps Measurements

Metric IdMetric NameApplied to
steps.runningsTotalSteps :: Runnings TotalServer Only
steps.waitingsTotalSteps :: Waitings TotalServer Only
steps.runningsSteps :: Runnings on NodeAll Nodes

Database Measurements

Metric IdMetric NameApplied to
db.numConnectionsDatabase :: Total ConnectionsServer Only
db.busyConnectionsDatabase :: Busy ConnectionsServer Only

Jetty(web server) Measurements

Metric IdMetric NameApplied to
jetty.totalConnectionsJetty :: Total ConnectionsServer Only
jetty.usedConnectionsJetty :: Used ConnectionsServer Only

UI Visits Measurements

Metric IdMetric NameApplied to
web.ui.oneMinuteRateUI Visits :: One-minute RateServer Only
web.ui.fiveMinuteRateUI Visits :: Five-minute RateServer Only
web.ui.fifteenMinuteRateUI Visits :: Fifteen-minute RateServer Only
web.ui.requestsUI Visits :: RequestsServer Only
web.ui.averageDurationUI Visits :: Average DurationServer Only

REST Visits Measurements

Metric IdMetric NameApplied to
web.rest.oneMinuteRateREST Visits :: One-minute RateServer Only
web.rest.fiveMinuteRateREST Visits :: Five-minute RateServer Only
web.rest.fifteenMinuteRateREST Visits :: Fifteen-minute RateServer Only
web.rest.requestsREST Visits :: RequestsServer Only
web.rest.averageDurationREST Visits :: Average DurationServer Only

RPC Visits Measurements

Metric IdMetric NameApplied to
web.rpc.oneMinuteRateRPC Visits :: One-minute RateServer Only
web.rpc.fiveMinuteRateRPC Visits :: Five-minute RateServer Only
web.rpc.fifteenMinuteRateRPC Visits :: Fifteen-minute RateServer Only
web.rpc.requestsRPC Visits :: RequestsServer Only
web.rpc.averageDurationRPC Visits :: Average DurationServer Only

Download Visits Measurements

Metric IdMetric NameApplied to
web.download.oneMinuteRateDownload Visits :: One-minute RateServer Only
web.download.fiveMinuteRateDownload Visits :: Five-minute RateServer Only
web.download.fifteenMinuteRateDownload Visits :: Fifteen-minute RateServer Only
web.download.requestsDownload Visits :: RequestsServer Only
web.download.averageDurationDownload Visits :: Average DurationServer Only

Upload Visits Measurements

Metric IdMetric NameApplied to
web.upload.oneMinuteRateUpload Visits :: One-minute RateServer Only
web.upload.fiveMinuteRateUpload Visits :: Five-minute RateServer Only
web.upload.fifteenMinuteRateUpload Visits :: Fifteen-minute RateServer Only
web.upload.requestsUpload Visits :: RequestsServer Only
web.upload.averageDurationUpload Visits :: Average DurationServer Only

Security

No, Any user can use the functions.