Monitoring

Endpoints related to gathered metrics for building dashboards, charts, and graphs.

Get Metrics

A basic query for retrieving metrics. For a more complex and granular report, see the /v1/monitoring/metrics/aggregate endpoint.

Requires the monitor-view capability.

SecuritybearerAuth and hubAuth
Request
query Parameters
object

Filter Field

The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for.

To search via labels, use label:<label key> as the filter. For example in URL parameters, filter[label:test]=abc.

Responses
200

Returns an array of metrics.

default

General error response from the platform

get/v1/monitoring/metrics
Response samples
application/json
{
  • "data": [
    ]
}

Generate Aggregated Metrics

Generate a metric report using an aggregated pipeline query with Mongo. This endpoint provides ultimate flexibility in generating data for dashboards, charts, graphs, etc.

You should always provide a time range filter to this call, either through the filter parameter or in the critera body. The aggregate is limited to 25,000 input documents, so a time frame will give the best results.

Requires the monitor-view capability.

SecuritybearerAuth and hubAuth
Request
query Parameters
object

Filter Field

The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for.

Request Body schema: application/json

The mongo syntax aggregate pipeline for querying metrics and formulating a report.

object

The criteria to add to the first match. Cycle will automatically provide the hub ID.

Array of objects

The aggregation pipeline. Supports Mongo-style syntax and operators.

Responses
200

Returns an object matching the shape of the output of the aggregated pipeline output.

default

General error response from the platform

post/v1/monitoring/metrics/aggregate
Request samples
application/json
{
  • "criteria": { },
  • "pipeline": [
    ]
}
Response samples
application/json
{
  • "data": [
    ]
}

Get Events

A basic query for retrieving events. For a more complex and granular report, see the /v1/monitoring/events/aggregate endpoint.

Requires the monitor-view capability.

SecuritybearerAuth and hubAuth
Request
query Parameters
object

Filter Field

The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for.

To search via labels, use label:<label key> as the filter. For example in URL parameters, filter[label:test]=abc.

Responses
200

Returns an array of events.

default

General error response from the platform

get/v1/monitoring/events
Response samples
application/json
{
  • "data": [
    ]
}

Generate Aggregated Events

Generate an events report using an aggregated pipeline query with Mongo. This endpoint provides ultimate flexibility in generating data for dashboards, charts, graphs, etc.

You should always provide a time range filter to this call, either through the filter parameter or in the critera body. The aggregate is limited to 25,000 input documents, so a time frame will give the best results.

Requires the monitor-view capability.

SecuritybearerAuth and hubAuth
Request
query Parameters
object

Filter Field

The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for.

Request Body schema: application/json

The mongo syntax aggregate pipeline for querying events and formulating a report.

object

The criteria to add to the first match. Cycle will automatically provide the hub ID.

Array of objects

The aggregation pipeline. Supports Mongo-style syntax and operators.

Responses
200

Returns an object matching the shape of the output of the aggregated pipeline output.

default

General error response from the platform

post/v1/monitoring/events/aggregate
Request samples
application/json
{
  • "criteria": { },
  • "pipeline": [
    ]
}
Response samples
application/json
{
  • "data": [
    ]
}

Aggregate Logs

A query for retrieving container instance logs.
Allows aggregate narrowing through filtering, searching, and scope parameters. If 'local' is set to true, only cached logs will be queried, and logs in object storage will be ignored. This leads to much faster performance.

Requires the monitor-view capability.

SecuritybearerAuth and hubAuth
Request
Request Body schema: application/json

Parameters for aggregating logs.

required
object
Array of objects
local
boolean or null

Indicates that only locally cached log lines should be queried. If true, logs in object storage will not be returned.

limit
integer or null

Describes the maximum number of log lines the query will return.

Responses
200

Returns an array of log lines.

default

General error response from the platform

post/v1/monitoring/logs/aggregate
Request samples
application/json
{
  • "scope": {
    },
  • "search": [
    ],
  • "local": true,
  • "limit": 1000
}
Response samples
application/json
{
  • "data": [
    ]
}

Get Monitoring Monitors

Returns location information about the monitors used for Cycle's external monitoring service. These monitors are used for determining the latency between the public internet and environment load balancers.

SecuritybearerAuth and hubAuth
Responses
200

Returns and array of monitor location information.

default

General error response from the platform

get/v1/monitoring/monitors
Response samples
application/json
{
  • "data": [
    ]
}