fbpx
GEThttps://api.spotinst.io/spectrum/metrics/alert?accountId={ACCOUNT_ID}

List all the Spectrum alerts present in your account.

URL Parameter

Parameter Type Description
ACCOUNT_ID String

Your Spotinst accountId associated with your token

Example: act-12345
Request

Headers
{
  "Content-Type": "application/json",
  "Authorization": "Bearer ${TOKEN}"
}
Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "request": {
    "id": "232ccc12-40f5-47f2-a531-bdf8d60fcdd9",
    "url": "/spectrum/metrics/alert?accountId=act-123456",
    "method": "GET",
    "timestamp": "2018-07-02T21:02:42.771Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    },
    "kind": "spotinst:spectrum:alert",
    "items": [
      {
        "id": "al-255d1149b5dd",
        "enabled": true,
        "status": "UNKNOWN",
        "name": "Spotinst - High CPU load",
        "namespace": "spotinst/compute",
        "metricName": "cpu_load",
        "period": "1m",
        "consecutivePeriods": 1,
        "statistic": "sum",
        "conditions": {
          "error": null,
          "warning": null,
          "critical": {
            "threshold": 80,
            "operator": "gt"
          }
        },
        "dimensions": [
          {
            "name": "instance_id",
            "value": "i-123456"
          }
        ],
        "description": "One or more of the instances have high CPU utilization",
        "documentation": "",
        "actionsEnabled": true,
        "actions": {
          "okActionIds": [
            "ac-4bd7e0a8b96b",
            "ac-664d6979ccbb"
          ],
          "warningActionIds": [],
          "errorActionIds": [],
          "criticalActionIds": [
            "ac-4bd7e0a8b96b",
            "ac-664d6979ccbb"
          ],
          "unknownActionIds": []
        },
        "updatedAt": "2017-09-07T13:34:01.000Z",
        "createdAt": "2017-08-20T16:34:16.000Z"
      },
      {
        "id": "al-7f6f7cfc568b",
        "enabled": true,
        "status": "UNKNOWN",
        "name": "Http 500",
        "namespace": "balancer",
        "metricName": "http_status_target_5xx",
        "period": "1m",
        "consecutivePeriods": 1,
        "statistic": "sum",
        "conditions": {
          "error": null,
          "warning": null,
          "critical": {
            "threshold": 1,
            "operator": "gt"
          }
        },
        "dimensions": [
          {
            "name": "balancer_id",
            "value": "lb-a1b4bc2df2f4"
          }
        ],
        "actionsEnabled": true,
        "actions": {
          "okActionIds": null,
          "warningActionIds": null,
          "errorActionIds": null,
          "criticalActionIds": [
            "ac-313045a29894"
          ],
          "unknownActionIds": null
        },
        "updatedAt": "2018-01-05T16:13:00.000Z",
        "createdAt": "2017-10-02T14:16:25.000Z"
      }
    ],
    "count": 2
  }
}