> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/~/revisions/1AlFSZBNMIBgs7fiOwFD/managed-services/monitoring-as-a-service/dcd-how-tos/create-alarms-actions.md).

# Create Alarms and Actions

{% hint style="info" %}
**Prerequisite:** Make sure your account has **Monitoring** [<mark style="color:blue;">privileges</mark>](/cloud/~/revisions/1AlFSZBNMIBgs7fiOwFD/managed-services/monitoring-as-a-service/dcd-how-tos/user-permissions.md#managing-user-privileges) enabled in the user group.‌
{% endhint %}

### Creating an Alarm

**1.** Select the **Management** option in the main menu bar of the [<mark style="color:blue;">DCD</mark>](https://app.gitbook.com/s/-Mj91LQrRzfHvr2Jl2Rv/general-information/glossary-of-terms#dcd).‌

**2.** Select **Monitoring** in the drop-down menu. The **Monitoring Manager** panel displays.‌

**3.** Select the **Create** button in the **Alarms** tab.‌

**4.** In the **Create** panel, create an alarm by performing the following substeps:‌

* **Name:** choose an appropriate name.
* **Server:** select a virtual instance.
* **Metric:** select the relevant metric.
* **Unit:**
  * select **Total** for absolute numbers (example: CPU utilization).
  * **Total** is unsupported for other metrics except if you’re using “delta” aggregation.
  * select a per-time rate in all other cases.
* **Threshold Type:** define equality of value.
* **Threshold:** enter the threshold value.
* **Range:** define the time range for the threshold to hit before trigger.
* **Range Aggregation:** time range aggregation types are **Average** or **Delta.**
* **Alarm Delay:** define the duration between two alarms.
* **Actions:** select one or multiple actions upon alarm trigger.
* Select **Create** to save the alarm.

Once an alarm has been created, you can either edit the alarm configuration or delete it if it is no longer needed.‌

The **details view** provides an option to list the **status and history** of an alarm.‌

Upon alarm trigger, the alarm icon will blink to indicate that the configured threshold has been triggered. The blinking will stop automatically once the system is back within the threshold. This is monitored within the defined duration.

**Range Aggregation** is provided so that the service does not spam users with emails. Instead, the system will wait between two alarms for a period of time before sending another notice. This will only happen when the criteria for the alarm are still fulfilled. If the criteria do not hit the threshold, no alarm is sent anymore.‌

### **Configuring Alarms** <a href="#example-values" id="example-values"></a>

The examples below show possible configurations for the `expression` property of an Alarm.

**Current CPU Load for all Cores**

Setting a trigger when the average load of all cores over the last hour exceeds 90%.

```
"expression": {
  "metric": 
    "instance_cpu_utilization_average",
  "source": {
    "uuid": "279565bf-...-e9572e185144"
  },
  "range": "1h",
  "comparisonThreshold": "90"
}
```

| Default Values                                              |
| ----------------------------------------------------------- |
| `"unit": "total"`                                           |
| `"rangeAggregation": "average"`                             |
| `"comparisonOperator": "greater_than_or_equal_to_threshold` |

**Increase in Received Bytes**

Setting a trigger when more than 1MB is incoming within the last ten minutes.

```
"expression": {
  "metric": "instance_network_in_bytes",
  "source": {
    "uuid": "e17f01e9-...-40968fbbb559"
  },
  "range": "10m",
  "rangeAggregation": "delta",
  "comparisonThreshold": "1000000"
}
```

| Default Values                                              |
| ----------------------------------------------------------- |
| `"unit": "total"`                                           |
| `"comparisonOperator": "greater_than_or_equal_to_threshold` |

**Sent Packets per Second (lower bound)**

Set a trigger when there is less than one outgoing packet per second. \*\*\*\*

```
"expression": {
  "metric": 
    "instance_network_out_packets",
  "source": {
    "uuid": "e17f01e9-...-40968fbbb559"
  },
  "unit": "per_second",
  "comparisonThreshold": "1",
  "comparisonOperator": 
    "less_than_threshold"
}
```

| Default Values                  |
| ------------------------------- |
| `"range": "4m"`                 |
| `"rangeAggregation": "average"` |

**Storage Writes per Second**

Set a trigger when there are more than 100 write operations per second.

```
"expression": {
  "metric": 
    "instance_volumes_write_ops",
  "source": {
    "uuid": "e17f01e9-...-40968fbbb559"
  },
  "unit": "per_second",
  "comparisonThreshold": "100"
}
```

| Default Values                                               |
| ------------------------------------------------------------ |
| `"unit": "total"`                                            |
| `"rangeAggregation": "average"`                              |
| `"comparisonOperator": "greater_than_or_equal_to_threshold"` |

### Creating an Action

In the **Actions** section, you can configure an action that will be executed when an alarm is activated. Currently, MaaS supports email notifications.

{% hint style="info" %}
**Prerequisite:** Make sure your account has **Monitoring** [<mark style="color:blue;">privileges</mark>](/cloud/~/revisions/1AlFSZBNMIBgs7fiOwFD/managed-services/monitoring-as-a-service/dcd-how-tos/user-permissions.md#managing-user-privileges) enabled in the user group.‌
{% endhint %}

**1.** Open the **Monitoring Manager** and select the **Actions** tab. The **Actions** tab displays.

**2.** Create an **Action** by performing the following sub-steps:

* Define a name for the action.
* Select the action type (send email only at the moment).
* Provide an Email address.
* Select **Create**.

After creation, you can edit the action configuration or delete it if not needed anymore.

The details view of a created action contains an option to list the **execution history** of an alarm.

{% hint style="info" %}
You can only delete an action when it is not in use by an alarm.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ionos.com/cloud/~/revisions/1AlFSZBNMIBgs7fiOwFD/managed-services/monitoring-as-a-service/dcd-how-tos/create-alarms-actions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
