Searching...

Monitoring

Endpoints for monitoring cloud resources, retrieving resource metrics, and managing alerts for system events.

get /metrics/{resourceId}

Get resource metrics

Retrieve metrics for a specific resource.

metric_type string

The type of metric to retrieve (e.g., cpu, memory, disk_io, network)

Enum
  • cpu
  • memory
  • disk_io
  • network
start_time string

The start time for the metrics query in ISO 8601 format

Format
date-time
end_time string

The end time for the metrics query in ISO 8601 format

Format
date-time
resourceId string required

The unique identifier of the resource

Responses

Metrics retrieved successfully

Response body Headers
cpu_usage array
memory_usage array
disk_io array
network array

This response does not contain any headers

Resource not found

Response body Headers

This response is empty

This response does not contain any headers

Response examples

Metrics retrieved successfully

{
  "cpu_usage": [
    {
      "timestamp": "2023-05-18T12:34:56Z",
      "value": 75.3
    },
    {
      "timestamp": "2023-05-18T12:35:56Z",
      "value": 76.1
    }
  ],
  "memory_usage": [
    {
      "timestamp": "2023-05-18T12:34:56Z",
      "value": 64.5
    },
    {
      "timestamp": "2023-05-18T12:35:56Z",
      "value": 65.2
    }
  ],
  "disk_io": [
    {
      "timestamp": "2023-05-18T12:34:56Z",
      "read": 150.0,
      "write": 80.5
    },
    {
      "timestamp": "2023-05-18T12:35:56Z",
      "read": 155.2,
      "write": 82.1
    }
  ],
  "network": [
    {
      "timestamp": "2023-05-18T12:34:56Z",
      "inbound": 500.0,
      "outbound": 300.0
    },
    {
      "timestamp": "2023-05-18T12:35:56Z",
      "inbound": 520.1,
      "outbound": 310.3
    }
  ]
}
get /alerts

Get all alerts

Retrieve a list of all active alerts.

resource_id string

The unique identifier of the resource

metric string

The metric being monitored (e.g., cpu_usage, memory_usage)

status string

The status of the alerts (e.g., active, resolved)

Enum
  • active
  • resolved
start_time string

Filter alerts created after this time (in ISO 8601 format)

Format
date-time
end_time string

Filter alerts created before this time (in ISO 8601 format)

Format
date-time
limit int

Limit the number of alerts returned in the response

offset int

The number of alerts to skip before starting to collect the result set

Responses

Alerts retrieved successfully

Response body Headers

This response does not contain any headers

Alerts not found

Response body Headers

This response is empty

This response does not contain any headers

Response examples

Alerts retrieved successfully

[
  {
    "id": "alert_123",
    "resource_id": "resource_123",
    "metric": "cpu_usage",
    "condition": ">",
    "threshold": 80.0,
    "status": "active",
    "created_at": "2023-05-18T12:34:56Z",
    "updated_at": "2023-05-18T12:34:56Z"
  },
  {
    "id": "alert_456",
    "resource_id": "resource_456",
    "metric": "memory_usage",
    "condition": ">",
    "threshold": 70.0,
    "status": "resolved",
    "created_at": "2023-05-18T14:56:23Z",
    "updated_at": "2023-05-18T15:00:00Z"
  }
]
post /alerts

Create a new alert

Create a new alert for monitoring a specific metric or condition.

resource_id string required

The unique identifier of the resource to be monitored

metric string required

The metric to be monitored (e.g., cpu_usage, memory_usage)

condition string required

The condition for the alert (e.g., greater than, less than)

threshold number required

The threshold value for the alert

description string

A brief description of the alert

Responses

Alert created successfully

Response body Headers
id string

The unique identifier for the new alert

resource_id string

The unique identifier of the resource being monitored

metric string

The metric being monitored

condition string

The condition for the alert

threshold number

The threshold value for the alert

description string

A brief description of the alert

status string

The status of the alert

Enum
  • active
  • resolved
created_at string

The date and time when the alert was created

Format
date-time
updated_at string

The date and time when the alert was last updated

Format
date-time

This response does not contain any headers

Invalid input

Response body Headers

This response is empty

This response does not contain any headers

Request examples

{
  "resource_id": "resource_123",
  "metric": "cpu_usage",
  "condition": ">",
  "threshold": 80.0,
  "description": "Alert when CPU usage exceeds 80%"
}

Response examples

Alert created successfully

{
  "id": "alert_789",
  "resource_id": "resource_123",
  "metric": "cpu_usage",
  "condition": ">",
  "threshold": 80.0,
  "description": "Alert when CPU usage exceeds 80%",
  "status": "active",
  "created_at": "2023-05-18T12:34:56Z",
  "updated_at": "2023-05-18T12:34:56Z"
}
delete /alerts/{id}

Delete alert

Delete an existing alert by its identifier.

id string required

The unique identifier of the alert

Responses

Alert deleted successfully

Response body Headers

This response is empty

This response does not contain any headers

Alert not found

Response body Headers

This response is empty

This response does not contain any headers

Response examples