Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Documentation

Skip to end of metadata
Go to start of metadata

Alarm and alert state changes

In Abiquo 3.8.2 the API now stores the state of alarms and alerts and the timestamp of the last state change.

Email notifications are sent when the state of an alert changes.

Example API data entities

When you first create an alarm it is inactive.

{
    "links": [
        {
            "title": "cpu_time",
            "rel": "metric",
            "type": "application/vnd.abiquo.metric+json",
            "href": "https://38testing.bcn.abiquo.com:443/api/cloud/virtualdatacenters/102/virtualappliances/307/virtualmachines/2563/metrics/cpu_time"
        },
        {
            "title": "ABQ_baf6c169-df08-49f5-8a65-d0d9991b2aa2",
            "rel": "virtualmachine",
            "type": "application/vnd.abiquo.virtualmachine+json",
            "href": "https://38testing.bcn.abiquo.com:443/api/cloud/virtualdatacenters/102/virtualappliances/307/virtualmachines/2563"
        },
        {
            "title": "8463d852-0b25-443a-a725-b1abccd2e8d4",
            "rel": "edit",
            "type": "application/vnd.abiquo.alarm+json",
            "href": "https://38testing.bcn.abiquo.com:443/api/cloud/virtualdatacenters/102/virtualappliances/307/virtualmachines/2563/metrics/cpu_time/alarms/8463d852-0b25-443a-a725-b1abccd2e8d4"
        }
    ],
    "name": "abc_alarm",
    "description": "cpu alarm",
    "period": 60,
    "evaluationPeriods": 3,
    "statistic": "average",
    "threshold": 1,
    "active": false,
    "formula": "greaterthan"
}

When the alarm is triggered by the metric conditions, the "active" attribute is set to true and the "stateUpdateTimestamp" attribute is added.

{
    "links": [
        {
            "title": "cpu_time",
            "rel": "metric",
            "type": "application/vnd.abiquo.metric+json",
            "href": "https://38testing.bcn.abiquo.com:443/api/cloud/virtualdatacenters/102/virtualappliances/307/virtualmachines/2563/metrics/cpu_time"
        },
        {
            "title": "ABQ_baf6c169-df08-49f5-8a65-d0d9991b2aa2",
            "rel": "virtualmachine",
            "type": "application/vnd.abiquo.virtualmachine+json",
            "href": "https://38testing.bcn.abiquo.com:443/api/cloud/virtualdatacenters/102/virtualappliances/307/virtualmachines/2563"
        },
        {
            "title": "8463d852-0b25-443a-a725-b1abccd2e8d4",
            "rel": "edit",
            "type": "application/vnd.abiquo.alarm+json",
            "href": "https://38testing.bcn.abiquo.com:443/api/cloud/virtualdatacenters/102/virtualappliances/307/virtualmachines/2563/metrics/cpu_time/alarms/8463d852-0b25-443a-a725-b1abccd2e8d4"
        }
    ],
    "name": "abc_alarm",
    "description": "cpu alarm",
    "period": 60,
    "evaluationPeriods": 3,
    "statistic": "average",
    "threshold": 1,
    "active": true,
    "formula": "greaterthan",
    "stateUpdateTimestamp": "2016-05-03T09:51:43.000+0000"
}

Attributes with the same names are used in the alerts to show when an alert is activated and when the state was updated.

{
    "links": [
        {
            "title": "efcca265-dd24-421e-94c8-ddcdbc5c3360",
            "rel": "edit",
            "type": "application/vnd.abiquo.alert+json",
            "href": "https://38testing.bcn.abiquo.com:443/api/cloud/virtualdatacenters/102/virtualappliances/307/alerts/efcca265-dd24-421e-94c8-ddcdbc5c3360"
        },
        {
            "title": "vapp_abc_vdc",
            "rel": "virtualappliance",
            "type": "application/vnd.abiquo.virtualappliance+json",
            "href": "https://38testing.bcn.abiquo.com:443/api/cloud/virtualdatacenters/102/virtualappliances/307"
        },
        {
            "title": "alarms",
            "rel": "alarms",
            "type": "application/vnd.abiquo.alarms+json",
            "href": "https://38testing.bcn.abiquo.com:443/api/cloud/virtualdatacenters/102/virtualappliances/307/alerts/efcca265-dd24-421e-94c8-ddcdbc5c3360/alarms"
        }
    ],
    "name": "abc_alert",
    "description": "abc_alert",
    "muted": false,
    "active": true,
    "stateUpdateTimestamp": "2016-05-03T09:51:43.000+0000",
    "alarms": [
        {
            "title": "8463d852-0b25-443a-a725-b1abccd2e8d4",
            "rel": "alarm",
            "type": "application/vnd.abiquo.alarm+json",
            "href": "https://38testing.bcn.abiquo.com:443/api/cloud/virtualdatacenters/102/virtualappliances/307/virtualmachines/2563/metrics/cpu_time/alarms/8463d852-0b25-443a-a725-b1abccd2e8d4"
        }
    ],
    "subscribers": [
        "cloudadmin@example.com"
    ]
}

Alert notification emails

Alert notification emails are sent when alerts change state, which means when they are activated or deactivated.

The standard alert has been changed to add the variable for state in the subject line:

Alert abc_alert has been deactivated

And in the message:

You are receiving this email because the alert abc_alert in virtual appliance vapp_abc_vdc has been deactivated.

Alert description

abc vapp alert

Notified alarms

  • abc_alarm: alarm

For further details, go to the Abiquo console at: https://38testing.bcn.abiquo.com/ui/

For details of how to change this email, please see Configure Email Templates#Monitoringalertemails

  • No labels