Creating an alert
Alerts monitor metrics and change their status when values fall outside the specified thresholds. You can set two thresholds for the same alert: Warning for a warning and Alarm for a critical error. To receive notifications when the status changes, create a notification channel beforehand. For real-time monitoring, add an alert widget to your dashboard.
This section explains how to create a custom alert and a multialert. Monium also supports SLO alerts and composite alerts whose status is evaluated based on other alerts.
Note
To view alerts, you need the viewer role or higher for the relevant cloud. Learn more about roles in Access management in Monium.
-
On the Monium
home page, select Alerts and SLOs → Alerts on the left. -
At the top right, click Create alert → Custom.
-
Specify the main alert parameters:
-
Name: Alert name.
-
ID: Unique alert ID with the project's prefix. If not set, it is generated automatically. Once the alert is created, you cannot change its ID.
-
Description: Alert description or comment.
-
Severity: Alert criticality level. Select it based on the event effect:
Unspecified: Draft or a test without a level.Disaster: Service unavailability or data loss risk.Critical: Service degradation or lack of resources.Info: Scheduled operation or a test alert.
-
-
Under Alerts settings, describe one or more queries.
-
To search for application metrics, enter the following in the query string:
-
project = <project_ID>: Select the project specified inx-monium-projectof the application's telemetry transmission configuration.This may be a cloud (
cloud__<cloud_ID>) or folder (folder__<folder_ID>) project, or another project. -
cluster = <cluster_name>: Select the name of the installation that runs your application. If no cluster is specified,cluster = defaultis used. -
service = <service_name>: Name of your application or service. You can use theOTEL_SERVICE_NAMEenvironment variable to provide it.If you do not see the required labels in the suggestions, you can enter them manually. However, the system most likely has not received data with these labels. For more on troubleshooting possible issues, see Data delivery troubleshooting.
-
-
To search for Yandex Cloud resource metrics, enter the following in the query string:
project = folder__<folder_ID>: ID of the folder the Yandex Cloud resource resides in.cluster = default.service = <__service_name__>, e.g.,__application-load-balancer__,__cdn__, or__iam__.- Labels of the resource. For example, for Identity and Access Management, you can specify a service account:
service_account = <service_account_name>.
You can use query names as variables in other queries, e.g.,
A + B. Do it by switching the query string to text mode . -
-
Under Trigger conditions, set the conditions for the alert to get the
WarningandAlarmstatuses:- Query for verification: Query the result of which is processed using the aggregation function.
- Aggregation function: Method for calculating a single value from the query results. For spikes, use maximum or at least one value; for sustained degradation, use average or all values.
- Comparison function: Condition for comparing the result with the
WarningandAlarmthresholds. For example, more is typically used for API latency, and less, for free disk space. - Warning: Early warning threshold, e.g.,
80% CPU utilization. - Alarm: Critical error threshold, e.g.,
90% CPU utilization. - Evaluation window: Interval for calculating the aggregation function. Increase the window to avoid responding to isolated spikes.
- Evaluation delay: Back-shift of the evaluation window. Use it if metrics arrive late or are aggregated with a delay.
For more on condition parameters, see Alert triggers.
-
Configure data decimation or leave the default values. For peak value alerts, choose
Maximum; for counters,SumorCount. If the state metric changes rarely, select Previous value in the Fill field. -
To create a multialert, add labels under Decomposition by labels.
Add labels that require a separate response. For example, if you add decomposition by
disk, Monium will create subalerts for each disk. Do not use labels with many unique values, e.g.,request_idoruser_id, as they can create too many subalerts. -
Set the no data policies or leave the default values. For critical metrics, choose the
No datastatus to distinguish metric collection failures from normal behavior. If individual instances tend to disappear during autoscaling, use simplified policy application. -
Optionally, specify annotations for the alert. Annotations add additional metadata to the alert. You can include this metadata into the notification message or display in the alert widget on your dashboard. For example, you can use annotations to provide metric timestamp and value when the alert triggers or generate a link to a chart.
-
Optionally, to sort alerts and search for alerts, add labels in
key=valueformat.You can add multiple labels. Do it by entering a
key=valuepair and clicking Enter. To use labels in another alert or the search bar, click Copy all labels. -
Optionally, under Links, add links to related resources.
-
Configure notifications. If you do not have a notification channel, create one.
To avoid receiving notifications every time the status changes, enable Noise suppression. Set the timeout interval during which Monium will send one notification with the resulting status. Use this setting for unstable metrics, e.g., API latency during brief load spikes. For more on noise suppression, see Noise suppression.
-
Check the result of evaluating the alert.
In the top right, click Check result. Monium will reevaluate the alert based on the current settings and display the resulting status, chart, and variable values. The check makes it possible to evaluate data availability and the correctness of alert settings.
-
Click Create. The alert will appear in the list.
| Color | Status | Description |
|---|---|---|
| 🟢 | OK |
The metric value is within the specified normal threshold. |
| 🟡 | Warning |
The metric value has reached the Warning threshold. |
| 🔴 | Alarm |
The metric value has reached the Alarm critical status threshold. |
| 🔵 | No data |
Lack of metric data to calculate the alert function. |
| ⚪️ | Error |
The alert value cannot be calculated. |