1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Monitoring
  5. Alarm
Oracle Cloud Infrastructure v1.27.0 published on Friday, Mar 15, 2024 by Pulumi

oci.Monitoring.Alarm

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.27.0 published on Friday, Mar 15, 2024 by Pulumi

    This resource provides the Alarm resource in Oracle Cloud Infrastructure Monitoring service.

    Creates a new alarm in the specified compartment. For more information, see Creating an Alarm. For important limits information, see Limits on Monitoring.

    This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations. Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, or transactions, per second (TPS) for a given tenancy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testAlarm = new oci.monitoring.Alarm("testAlarm", {
        compartmentId: _var.compartment_id,
        destinations: [oci_ons_notification_topic.test_notification_topic.id],
        displayName: _var.alarm_display_name,
        isEnabled: _var.alarm_is_enabled,
        metricCompartmentId: _var.alarm_metric_compartment_id,
        namespace: _var.alarm_namespace,
        query: _var.alarm_query,
        severity: _var.alarm_severity,
        body: _var.alarm_body,
        definedTags: {
            "Operations.CostCenter": "42",
        },
        freeformTags: {
            Department: "Finance",
        },
        isNotificationsPerMetricDimensionEnabled: _var.alarm_is_notifications_per_metric_dimension_enabled,
        messageFormat: _var.alarm_message_format,
        metricCompartmentIdInSubtree: _var.alarm_metric_compartment_id_in_subtree,
        pendingDuration: _var.alarm_pending_duration,
        repeatNotificationDuration: _var.alarm_repeat_notification_duration,
        resolution: _var.alarm_resolution,
        resourceGroup: _var.alarm_resource_group,
        suppression: {
            timeSuppressFrom: _var.alarm_suppression_time_suppress_from,
            timeSuppressUntil: _var.alarm_suppression_time_suppress_until,
            description: _var.alarm_suppression_description,
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_alarm = oci.monitoring.Alarm("testAlarm",
        compartment_id=var["compartment_id"],
        destinations=[oci_ons_notification_topic["test_notification_topic"]["id"]],
        display_name=var["alarm_display_name"],
        is_enabled=var["alarm_is_enabled"],
        metric_compartment_id=var["alarm_metric_compartment_id"],
        namespace=var["alarm_namespace"],
        query=var["alarm_query"],
        severity=var["alarm_severity"],
        body=var["alarm_body"],
        defined_tags={
            "Operations.CostCenter": "42",
        },
        freeform_tags={
            "Department": "Finance",
        },
        is_notifications_per_metric_dimension_enabled=var["alarm_is_notifications_per_metric_dimension_enabled"],
        message_format=var["alarm_message_format"],
        metric_compartment_id_in_subtree=var["alarm_metric_compartment_id_in_subtree"],
        pending_duration=var["alarm_pending_duration"],
        repeat_notification_duration=var["alarm_repeat_notification_duration"],
        resolution=var["alarm_resolution"],
        resource_group=var["alarm_resource_group"],
        suppression=oci.monitoring.AlarmSuppressionArgs(
            time_suppress_from=var["alarm_suppression_time_suppress_from"],
            time_suppress_until=var["alarm_suppression_time_suppress_until"],
            description=var["alarm_suppression_description"],
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Monitoring"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Monitoring.NewAlarm(ctx, "testAlarm", &Monitoring.AlarmArgs{
    			CompartmentId: pulumi.Any(_var.Compartment_id),
    			Destinations: pulumi.StringArray{
    				oci_ons_notification_topic.Test_notification_topic.Id,
    			},
    			DisplayName:         pulumi.Any(_var.Alarm_display_name),
    			IsEnabled:           pulumi.Any(_var.Alarm_is_enabled),
    			MetricCompartmentId: pulumi.Any(_var.Alarm_metric_compartment_id),
    			Namespace:           pulumi.Any(_var.Alarm_namespace),
    			Query:               pulumi.Any(_var.Alarm_query),
    			Severity:            pulumi.Any(_var.Alarm_severity),
    			Body:                pulumi.Any(_var.Alarm_body),
    			DefinedTags: pulumi.Map{
    				"Operations.CostCenter": pulumi.Any("42"),
    			},
    			FreeformTags: pulumi.Map{
    				"Department": pulumi.Any("Finance"),
    			},
    			IsNotificationsPerMetricDimensionEnabled: pulumi.Any(_var.Alarm_is_notifications_per_metric_dimension_enabled),
    			MessageFormat:                            pulumi.Any(_var.Alarm_message_format),
    			MetricCompartmentIdInSubtree:             pulumi.Any(_var.Alarm_metric_compartment_id_in_subtree),
    			PendingDuration:                          pulumi.Any(_var.Alarm_pending_duration),
    			RepeatNotificationDuration:               pulumi.Any(_var.Alarm_repeat_notification_duration),
    			Resolution:                               pulumi.Any(_var.Alarm_resolution),
    			ResourceGroup:                            pulumi.Any(_var.Alarm_resource_group),
    			Suppression: &monitoring.AlarmSuppressionTypeArgs{
    				TimeSuppressFrom:  pulumi.Any(_var.Alarm_suppression_time_suppress_from),
    				TimeSuppressUntil: pulumi.Any(_var.Alarm_suppression_time_suppress_until),
    				Description:       pulumi.Any(_var.Alarm_suppression_description),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testAlarm = new Oci.Monitoring.Alarm("testAlarm", new()
        {
            CompartmentId = @var.Compartment_id,
            Destinations = new[]
            {
                oci_ons_notification_topic.Test_notification_topic.Id,
            },
            DisplayName = @var.Alarm_display_name,
            IsEnabled = @var.Alarm_is_enabled,
            MetricCompartmentId = @var.Alarm_metric_compartment_id,
            Namespace = @var.Alarm_namespace,
            Query = @var.Alarm_query,
            Severity = @var.Alarm_severity,
            Body = @var.Alarm_body,
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            FreeformTags = 
            {
                { "Department", "Finance" },
            },
            IsNotificationsPerMetricDimensionEnabled = @var.Alarm_is_notifications_per_metric_dimension_enabled,
            MessageFormat = @var.Alarm_message_format,
            MetricCompartmentIdInSubtree = @var.Alarm_metric_compartment_id_in_subtree,
            PendingDuration = @var.Alarm_pending_duration,
            RepeatNotificationDuration = @var.Alarm_repeat_notification_duration,
            Resolution = @var.Alarm_resolution,
            ResourceGroup = @var.Alarm_resource_group,
            Suppression = new Oci.Monitoring.Inputs.AlarmSuppressionArgs
            {
                TimeSuppressFrom = @var.Alarm_suppression_time_suppress_from,
                TimeSuppressUntil = @var.Alarm_suppression_time_suppress_until,
                Description = @var.Alarm_suppression_description,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Monitoring.Alarm;
    import com.pulumi.oci.Monitoring.AlarmArgs;
    import com.pulumi.oci.Monitoring.inputs.AlarmSuppressionArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var testAlarm = new Alarm("testAlarm", AlarmArgs.builder()        
                .compartmentId(var_.compartment_id())
                .destinations(oci_ons_notification_topic.test_notification_topic().id())
                .displayName(var_.alarm_display_name())
                .isEnabled(var_.alarm_is_enabled())
                .metricCompartmentId(var_.alarm_metric_compartment_id())
                .namespace(var_.alarm_namespace())
                .query(var_.alarm_query())
                .severity(var_.alarm_severity())
                .body(var_.alarm_body())
                .definedTags(Map.of("Operations.CostCenter", "42"))
                .freeformTags(Map.of("Department", "Finance"))
                .isNotificationsPerMetricDimensionEnabled(var_.alarm_is_notifications_per_metric_dimension_enabled())
                .messageFormat(var_.alarm_message_format())
                .metricCompartmentIdInSubtree(var_.alarm_metric_compartment_id_in_subtree())
                .pendingDuration(var_.alarm_pending_duration())
                .repeatNotificationDuration(var_.alarm_repeat_notification_duration())
                .resolution(var_.alarm_resolution())
                .resourceGroup(var_.alarm_resource_group())
                .suppression(AlarmSuppressionArgs.builder()
                    .timeSuppressFrom(var_.alarm_suppression_time_suppress_from())
                    .timeSuppressUntil(var_.alarm_suppression_time_suppress_until())
                    .description(var_.alarm_suppression_description())
                    .build())
                .build());
    
        }
    }
    
    resources:
      testAlarm:
        type: oci:Monitoring:Alarm
        properties:
          #Required
          compartmentId: ${var.compartment_id}
          destinations:
            - ${oci_ons_notification_topic.test_notification_topic.id}
          displayName: ${var.alarm_display_name}
          isEnabled: ${var.alarm_is_enabled}
          metricCompartmentId: ${var.alarm_metric_compartment_id}
          namespace: ${var.alarm_namespace}
          query: ${var.alarm_query}
          severity: ${var.alarm_severity}
          #Optional
          body: ${var.alarm_body}
          definedTags:
            Operations.CostCenter: '42'
          freeformTags:
            Department: Finance
          isNotificationsPerMetricDimensionEnabled: ${var.alarm_is_notifications_per_metric_dimension_enabled}
          messageFormat: ${var.alarm_message_format}
          metricCompartmentIdInSubtree: ${var.alarm_metric_compartment_id_in_subtree}
          pendingDuration: ${var.alarm_pending_duration}
          repeatNotificationDuration: ${var.alarm_repeat_notification_duration}
          resolution: ${var.alarm_resolution}
          resourceGroup: ${var.alarm_resource_group}
          suppression:
            timeSuppressFrom: ${var.alarm_suppression_time_suppress_from}
            timeSuppressUntil: ${var.alarm_suppression_time_suppress_until}
            description: ${var.alarm_suppression_description}
    

    Create Alarm Resource

    new Alarm(name: string, args: AlarmArgs, opts?: CustomResourceOptions);
    @overload
    def Alarm(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              body: Optional[str] = None,
              compartment_id: Optional[str] = None,
              defined_tags: Optional[Mapping[str, Any]] = None,
              destinations: Optional[Sequence[str]] = None,
              display_name: Optional[str] = None,
              freeform_tags: Optional[Mapping[str, Any]] = None,
              is_enabled: Optional[bool] = None,
              is_notifications_per_metric_dimension_enabled: Optional[bool] = None,
              message_format: Optional[str] = None,
              metric_compartment_id: Optional[str] = None,
              metric_compartment_id_in_subtree: Optional[bool] = None,
              namespace: Optional[str] = None,
              pending_duration: Optional[str] = None,
              query: Optional[str] = None,
              repeat_notification_duration: Optional[str] = None,
              resolution: Optional[str] = None,
              resource_group: Optional[str] = None,
              severity: Optional[str] = None,
              suppression: Optional[_monitoring.AlarmSuppressionArgs] = None)
    @overload
    def Alarm(resource_name: str,
              args: AlarmArgs,
              opts: Optional[ResourceOptions] = None)
    func NewAlarm(ctx *Context, name string, args AlarmArgs, opts ...ResourceOption) (*Alarm, error)
    public Alarm(string name, AlarmArgs args, CustomResourceOptions? opts = null)
    public Alarm(String name, AlarmArgs args)
    public Alarm(String name, AlarmArgs args, CustomResourceOptions options)
    
    type: oci:Monitoring:Alarm
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args AlarmArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AlarmArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AlarmArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlarmArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AlarmArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Alarm Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Alarm resource accepts the following input properties:

    CompartmentId string
    (Updatable) The OCID of the compartment containing the alarm.
    Destinations List<string>
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    DisplayName string

    (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    This value determines the title of each alarm notification.

    Example: High CPU Utilization

    IsEnabled bool
    (Updatable) Whether the alarm is enabled. Example: true
    MetricCompartmentId string
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    Namespace string
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    Query string

    (Updatable) The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see Editing the MQL Expression for a Query. For details about MQL, see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

    Example of threshold alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85


    Example of absence alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent()


    Severity string
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    Body string
    (Updatable) The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: High CPU usage alert. Follow runbook instructions for resolution.
    DefinedTags Dictionary<string, object>
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    FreeformTags Dictionary<string, object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    IsNotificationsPerMetricDimensionEnabled bool
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    MessageFormat string
    (Updatable) The format to use for alarm notifications. The formats are:
    MetricCompartmentIdInSubtree bool
    (Updatable) When true, the alarm evaluates metrics from all compartments and subcompartments. The parameter can only be set to true when metricCompartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, the alarm evaluates metrics from only the compartment specified in metricCompartmentId. Default is false. Example: true
    PendingDuration string

    (Updatable) The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING". For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING".

    The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.

    Under the default value of PT1M, the first evaluation that breaches the alarm updates the state to "FIRING".

    The alarm updates its status to "OK" when the breaching condition has been clear for the most recent minute.

    Example: PT5M

    RepeatNotificationDuration string

    (Updatable) The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

    Default value: null (notifications are not re-submitted).

    Example: PT2H

    Resolution string
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    ResourceGroup string
    (Updatable) Resource group that you want to match. A null value returns only metric data that has no resource groups. The alarm retrieves metric data associated with the specified resource group only. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Avoid entering confidential information. Example: frontend-fleet
    Suppression AlarmSuppression
    (Updatable) The configuration details for suppressing an alarm.
    CompartmentId string
    (Updatable) The OCID of the compartment containing the alarm.
    Destinations []string
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    DisplayName string

    (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    This value determines the title of each alarm notification.

    Example: High CPU Utilization

    IsEnabled bool
    (Updatable) Whether the alarm is enabled. Example: true
    MetricCompartmentId string
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    Namespace string
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    Query string

    (Updatable) The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see Editing the MQL Expression for a Query. For details about MQL, see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

    Example of threshold alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85


    Example of absence alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent()


    Severity string
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    Body string
    (Updatable) The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: High CPU usage alert. Follow runbook instructions for resolution.
    DefinedTags map[string]interface{}
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    FreeformTags map[string]interface{}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    IsNotificationsPerMetricDimensionEnabled bool
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    MessageFormat string
    (Updatable) The format to use for alarm notifications. The formats are:
    MetricCompartmentIdInSubtree bool
    (Updatable) When true, the alarm evaluates metrics from all compartments and subcompartments. The parameter can only be set to true when metricCompartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, the alarm evaluates metrics from only the compartment specified in metricCompartmentId. Default is false. Example: true
    PendingDuration string

    (Updatable) The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING". For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING".

    The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.

    Under the default value of PT1M, the first evaluation that breaches the alarm updates the state to "FIRING".

    The alarm updates its status to "OK" when the breaching condition has been clear for the most recent minute.

    Example: PT5M

    RepeatNotificationDuration string

    (Updatable) The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

    Default value: null (notifications are not re-submitted).

    Example: PT2H

    Resolution string
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    ResourceGroup string
    (Updatable) Resource group that you want to match. A null value returns only metric data that has no resource groups. The alarm retrieves metric data associated with the specified resource group only. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Avoid entering confidential information. Example: frontend-fleet
    Suppression AlarmSuppressionTypeArgs
    (Updatable) The configuration details for suppressing an alarm.
    compartmentId String
    (Updatable) The OCID of the compartment containing the alarm.
    destinations List<String>
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    displayName String

    (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    This value determines the title of each alarm notification.

    Example: High CPU Utilization

    isEnabled Boolean
    (Updatable) Whether the alarm is enabled. Example: true
    metricCompartmentId String
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    namespace String
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    query String

    (Updatable) The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see Editing the MQL Expression for a Query. For details about MQL, see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

    Example of threshold alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85


    Example of absence alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent()


    severity String
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    body String
    (Updatable) The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: High CPU usage alert. Follow runbook instructions for resolution.
    definedTags Map<String,Object>
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    freeformTags Map<String,Object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    isNotificationsPerMetricDimensionEnabled Boolean
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    messageFormat String
    (Updatable) The format to use for alarm notifications. The formats are:
    metricCompartmentIdInSubtree Boolean
    (Updatable) When true, the alarm evaluates metrics from all compartments and subcompartments. The parameter can only be set to true when metricCompartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, the alarm evaluates metrics from only the compartment specified in metricCompartmentId. Default is false. Example: true
    pendingDuration String

    (Updatable) The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING". For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING".

    The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.

    Under the default value of PT1M, the first evaluation that breaches the alarm updates the state to "FIRING".

    The alarm updates its status to "OK" when the breaching condition has been clear for the most recent minute.

    Example: PT5M

    repeatNotificationDuration String

    (Updatable) The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

    Default value: null (notifications are not re-submitted).

    Example: PT2H

    resolution String
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resourceGroup String
    (Updatable) Resource group that you want to match. A null value returns only metric data that has no resource groups. The alarm retrieves metric data associated with the specified resource group only. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Avoid entering confidential information. Example: frontend-fleet
    suppression AlarmSuppression
    (Updatable) The configuration details for suppressing an alarm.
    compartmentId string
    (Updatable) The OCID of the compartment containing the alarm.
    destinations string[]
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    displayName string

    (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    This value determines the title of each alarm notification.

    Example: High CPU Utilization

    isEnabled boolean
    (Updatable) Whether the alarm is enabled. Example: true
    metricCompartmentId string
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    namespace string
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    query string

    (Updatable) The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see Editing the MQL Expression for a Query. For details about MQL, see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

    Example of threshold alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85


    Example of absence alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent()


    severity string
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    body string
    (Updatable) The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: High CPU usage alert. Follow runbook instructions for resolution.
    definedTags {[key: string]: any}
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    freeformTags {[key: string]: any}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    isNotificationsPerMetricDimensionEnabled boolean
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    messageFormat string
    (Updatable) The format to use for alarm notifications. The formats are:
    metricCompartmentIdInSubtree boolean
    (Updatable) When true, the alarm evaluates metrics from all compartments and subcompartments. The parameter can only be set to true when metricCompartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, the alarm evaluates metrics from only the compartment specified in metricCompartmentId. Default is false. Example: true
    pendingDuration string

    (Updatable) The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING". For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING".

    The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.

    Under the default value of PT1M, the first evaluation that breaches the alarm updates the state to "FIRING".

    The alarm updates its status to "OK" when the breaching condition has been clear for the most recent minute.

    Example: PT5M

    repeatNotificationDuration string

    (Updatable) The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

    Default value: null (notifications are not re-submitted).

    Example: PT2H

    resolution string
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resourceGroup string
    (Updatable) Resource group that you want to match. A null value returns only metric data that has no resource groups. The alarm retrieves metric data associated with the specified resource group only. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Avoid entering confidential information. Example: frontend-fleet
    suppression AlarmSuppression
    (Updatable) The configuration details for suppressing an alarm.
    compartment_id str
    (Updatable) The OCID of the compartment containing the alarm.
    destinations Sequence[str]
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    display_name str

    (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    This value determines the title of each alarm notification.

    Example: High CPU Utilization

    is_enabled bool
    (Updatable) Whether the alarm is enabled. Example: true
    metric_compartment_id str
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    namespace str
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    query str

    (Updatable) The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see Editing the MQL Expression for a Query. For details about MQL, see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

    Example of threshold alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85


    Example of absence alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent()


    severity str
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    body str
    (Updatable) The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: High CPU usage alert. Follow runbook instructions for resolution.
    defined_tags Mapping[str, Any]
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    freeform_tags Mapping[str, Any]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    is_notifications_per_metric_dimension_enabled bool
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    message_format str
    (Updatable) The format to use for alarm notifications. The formats are:
    metric_compartment_id_in_subtree bool
    (Updatable) When true, the alarm evaluates metrics from all compartments and subcompartments. The parameter can only be set to true when metricCompartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, the alarm evaluates metrics from only the compartment specified in metricCompartmentId. Default is false. Example: true
    pending_duration str

    (Updatable) The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING". For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING".

    The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.

    Under the default value of PT1M, the first evaluation that breaches the alarm updates the state to "FIRING".

    The alarm updates its status to "OK" when the breaching condition has been clear for the most recent minute.

    Example: PT5M

    repeat_notification_duration str

    (Updatable) The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

    Default value: null (notifications are not re-submitted).

    Example: PT2H

    resolution str
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resource_group str
    (Updatable) Resource group that you want to match. A null value returns only metric data that has no resource groups. The alarm retrieves metric data associated with the specified resource group only. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Avoid entering confidential information. Example: frontend-fleet
    suppression AlarmSuppressionArgs
    (Updatable) The configuration details for suppressing an alarm.
    compartmentId String
    (Updatable) The OCID of the compartment containing the alarm.
    destinations List<String>
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    displayName String

    (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    This value determines the title of each alarm notification.

    Example: High CPU Utilization

    isEnabled Boolean
    (Updatable) Whether the alarm is enabled. Example: true
    metricCompartmentId String
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    namespace String
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    query String

    (Updatable) The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see Editing the MQL Expression for a Query. For details about MQL, see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

    Example of threshold alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85


    Example of absence alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent()


    severity String
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    body String
    (Updatable) The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: High CPU usage alert. Follow runbook instructions for resolution.
    definedTags Map<Any>
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    freeformTags Map<Any>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    isNotificationsPerMetricDimensionEnabled Boolean
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    messageFormat String
    (Updatable) The format to use for alarm notifications. The formats are:
    metricCompartmentIdInSubtree Boolean
    (Updatable) When true, the alarm evaluates metrics from all compartments and subcompartments. The parameter can only be set to true when metricCompartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, the alarm evaluates metrics from only the compartment specified in metricCompartmentId. Default is false. Example: true
    pendingDuration String

    (Updatable) The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING". For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING".

    The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.

    Under the default value of PT1M, the first evaluation that breaches the alarm updates the state to "FIRING".

    The alarm updates its status to "OK" when the breaching condition has been clear for the most recent minute.

    Example: PT5M

    repeatNotificationDuration String

    (Updatable) The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

    Default value: null (notifications are not re-submitted).

    Example: PT2H

    resolution String
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resourceGroup String
    (Updatable) Resource group that you want to match. A null value returns only metric data that has no resource groups. The alarm retrieves metric data associated with the specified resource group only. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Avoid entering confidential information. Example: frontend-fleet
    suppression Property Map
    (Updatable) The configuration details for suppressing an alarm.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Alarm resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The current lifecycle state of the alarm. Example: DELETED
    TimeCreated string
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    TimeUpdated string
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The current lifecycle state of the alarm. Example: DELETED
    TimeCreated string
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    TimeUpdated string
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The current lifecycle state of the alarm. Example: DELETED
    timeCreated String
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeUpdated String
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The current lifecycle state of the alarm. Example: DELETED
    timeCreated string
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeUpdated string
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    The current lifecycle state of the alarm. Example: DELETED
    time_created str
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    time_updated str
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The current lifecycle state of the alarm. Example: DELETED
    timeCreated String
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeUpdated String
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z

    Look up Existing Alarm Resource

    Get an existing Alarm resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AlarmState, opts?: CustomResourceOptions): Alarm
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            body: Optional[str] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, Any]] = None,
            destinations: Optional[Sequence[str]] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, Any]] = None,
            is_enabled: Optional[bool] = None,
            is_notifications_per_metric_dimension_enabled: Optional[bool] = None,
            message_format: Optional[str] = None,
            metric_compartment_id: Optional[str] = None,
            metric_compartment_id_in_subtree: Optional[bool] = None,
            namespace: Optional[str] = None,
            pending_duration: Optional[str] = None,
            query: Optional[str] = None,
            repeat_notification_duration: Optional[str] = None,
            resolution: Optional[str] = None,
            resource_group: Optional[str] = None,
            severity: Optional[str] = None,
            state: Optional[str] = None,
            suppression: Optional[_monitoring.AlarmSuppressionArgs] = None,
            time_created: Optional[str] = None,
            time_updated: Optional[str] = None) -> Alarm
    func GetAlarm(ctx *Context, name string, id IDInput, state *AlarmState, opts ...ResourceOption) (*Alarm, error)
    public static Alarm Get(string name, Input<string> id, AlarmState? state, CustomResourceOptions? opts = null)
    public static Alarm get(String name, Output<String> id, AlarmState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Body string
    (Updatable) The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: High CPU usage alert. Follow runbook instructions for resolution.
    CompartmentId string
    (Updatable) The OCID of the compartment containing the alarm.
    DefinedTags Dictionary<string, object>
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    Destinations List<string>
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    DisplayName string

    (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    This value determines the title of each alarm notification.

    Example: High CPU Utilization

    FreeformTags Dictionary<string, object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    IsEnabled bool
    (Updatable) Whether the alarm is enabled. Example: true
    IsNotificationsPerMetricDimensionEnabled bool
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    MessageFormat string
    (Updatable) The format to use for alarm notifications. The formats are:
    MetricCompartmentId string
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    MetricCompartmentIdInSubtree bool
    (Updatable) When true, the alarm evaluates metrics from all compartments and subcompartments. The parameter can only be set to true when metricCompartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, the alarm evaluates metrics from only the compartment specified in metricCompartmentId. Default is false. Example: true
    Namespace string
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    PendingDuration string

    (Updatable) The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING". For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING".

    The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.

    Under the default value of PT1M, the first evaluation that breaches the alarm updates the state to "FIRING".

    The alarm updates its status to "OK" when the breaching condition has been clear for the most recent minute.

    Example: PT5M

    Query string

    (Updatable) The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see Editing the MQL Expression for a Query. For details about MQL, see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

    Example of threshold alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85


    Example of absence alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent()


    RepeatNotificationDuration string

    (Updatable) The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

    Default value: null (notifications are not re-submitted).

    Example: PT2H

    Resolution string
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    ResourceGroup string
    (Updatable) Resource group that you want to match. A null value returns only metric data that has no resource groups. The alarm retrieves metric data associated with the specified resource group only. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Avoid entering confidential information. Example: frontend-fleet
    Severity string
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    State string
    The current lifecycle state of the alarm. Example: DELETED
    Suppression AlarmSuppression
    (Updatable) The configuration details for suppressing an alarm.
    TimeCreated string
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    TimeUpdated string
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    Body string
    (Updatable) The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: High CPU usage alert. Follow runbook instructions for resolution.
    CompartmentId string
    (Updatable) The OCID of the compartment containing the alarm.
    DefinedTags map[string]interface{}
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    Destinations []string
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    DisplayName string

    (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    This value determines the title of each alarm notification.

    Example: High CPU Utilization

    FreeformTags map[string]interface{}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    IsEnabled bool
    (Updatable) Whether the alarm is enabled. Example: true
    IsNotificationsPerMetricDimensionEnabled bool
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    MessageFormat string
    (Updatable) The format to use for alarm notifications. The formats are:
    MetricCompartmentId string
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    MetricCompartmentIdInSubtree bool
    (Updatable) When true, the alarm evaluates metrics from all compartments and subcompartments. The parameter can only be set to true when metricCompartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, the alarm evaluates metrics from only the compartment specified in metricCompartmentId. Default is false. Example: true
    Namespace string
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    PendingDuration string

    (Updatable) The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING". For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING".

    The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.

    Under the default value of PT1M, the first evaluation that breaches the alarm updates the state to "FIRING".

    The alarm updates its status to "OK" when the breaching condition has been clear for the most recent minute.

    Example: PT5M

    Query string

    (Updatable) The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see Editing the MQL Expression for a Query. For details about MQL, see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

    Example of threshold alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85


    Example of absence alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent()


    RepeatNotificationDuration string

    (Updatable) The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

    Default value: null (notifications are not re-submitted).

    Example: PT2H

    Resolution string
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    ResourceGroup string
    (Updatable) Resource group that you want to match. A null value returns only metric data that has no resource groups. The alarm retrieves metric data associated with the specified resource group only. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Avoid entering confidential information. Example: frontend-fleet
    Severity string
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    State string
    The current lifecycle state of the alarm. Example: DELETED
    Suppression AlarmSuppressionTypeArgs
    (Updatable) The configuration details for suppressing an alarm.
    TimeCreated string
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    TimeUpdated string
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    body String
    (Updatable) The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: High CPU usage alert. Follow runbook instructions for resolution.
    compartmentId String
    (Updatable) The OCID of the compartment containing the alarm.
    definedTags Map<String,Object>
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    destinations List<String>
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    displayName String

    (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    This value determines the title of each alarm notification.

    Example: High CPU Utilization

    freeformTags Map<String,Object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    isEnabled Boolean
    (Updatable) Whether the alarm is enabled. Example: true
    isNotificationsPerMetricDimensionEnabled Boolean
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    messageFormat String
    (Updatable) The format to use for alarm notifications. The formats are:
    metricCompartmentId String
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    metricCompartmentIdInSubtree Boolean
    (Updatable) When true, the alarm evaluates metrics from all compartments and subcompartments. The parameter can only be set to true when metricCompartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, the alarm evaluates metrics from only the compartment specified in metricCompartmentId. Default is false. Example: true
    namespace String
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    pendingDuration String

    (Updatable) The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING". For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING".

    The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.

    Under the default value of PT1M, the first evaluation that breaches the alarm updates the state to "FIRING".

    The alarm updates its status to "OK" when the breaching condition has been clear for the most recent minute.

    Example: PT5M

    query String

    (Updatable) The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see Editing the MQL Expression for a Query. For details about MQL, see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

    Example of threshold alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85


    Example of absence alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent()


    repeatNotificationDuration String

    (Updatable) The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

    Default value: null (notifications are not re-submitted).

    Example: PT2H

    resolution String
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resourceGroup String
    (Updatable) Resource group that you want to match. A null value returns only metric data that has no resource groups. The alarm retrieves metric data associated with the specified resource group only. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Avoid entering confidential information. Example: frontend-fleet
    severity String
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    state String
    The current lifecycle state of the alarm. Example: DELETED
    suppression AlarmSuppression
    (Updatable) The configuration details for suppressing an alarm.
    timeCreated String
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeUpdated String
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    body string
    (Updatable) The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: High CPU usage alert. Follow runbook instructions for resolution.
    compartmentId string
    (Updatable) The OCID of the compartment containing the alarm.
    definedTags {[key: string]: any}
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    destinations string[]
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    displayName string

    (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    This value determines the title of each alarm notification.

    Example: High CPU Utilization

    freeformTags {[key: string]: any}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    isEnabled boolean
    (Updatable) Whether the alarm is enabled. Example: true
    isNotificationsPerMetricDimensionEnabled boolean
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    messageFormat string
    (Updatable) The format to use for alarm notifications. The formats are:
    metricCompartmentId string
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    metricCompartmentIdInSubtree boolean
    (Updatable) When true, the alarm evaluates metrics from all compartments and subcompartments. The parameter can only be set to true when metricCompartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, the alarm evaluates metrics from only the compartment specified in metricCompartmentId. Default is false. Example: true
    namespace string
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    pendingDuration string

    (Updatable) The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING". For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING".

    The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.

    Under the default value of PT1M, the first evaluation that breaches the alarm updates the state to "FIRING".

    The alarm updates its status to "OK" when the breaching condition has been clear for the most recent minute.

    Example: PT5M

    query string

    (Updatable) The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see Editing the MQL Expression for a Query. For details about MQL, see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

    Example of threshold alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85


    Example of absence alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent()


    repeatNotificationDuration string

    (Updatable) The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

    Default value: null (notifications are not re-submitted).

    Example: PT2H

    resolution string
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resourceGroup string
    (Updatable) Resource group that you want to match. A null value returns only metric data that has no resource groups. The alarm retrieves metric data associated with the specified resource group only. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Avoid entering confidential information. Example: frontend-fleet
    severity string
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    state string
    The current lifecycle state of the alarm. Example: DELETED
    suppression AlarmSuppression
    (Updatable) The configuration details for suppressing an alarm.
    timeCreated string
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeUpdated string
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    body str
    (Updatable) The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: High CPU usage alert. Follow runbook instructions for resolution.
    compartment_id str
    (Updatable) The OCID of the compartment containing the alarm.
    defined_tags Mapping[str, Any]
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    destinations Sequence[str]
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    display_name str

    (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    This value determines the title of each alarm notification.

    Example: High CPU Utilization

    freeform_tags Mapping[str, Any]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    is_enabled bool
    (Updatable) Whether the alarm is enabled. Example: true
    is_notifications_per_metric_dimension_enabled bool
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    message_format str
    (Updatable) The format to use for alarm notifications. The formats are:
    metric_compartment_id str
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    metric_compartment_id_in_subtree bool
    (Updatable) When true, the alarm evaluates metrics from all compartments and subcompartments. The parameter can only be set to true when metricCompartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, the alarm evaluates metrics from only the compartment specified in metricCompartmentId. Default is false. Example: true
    namespace str
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    pending_duration str

    (Updatable) The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING". For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING".

    The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.

    Under the default value of PT1M, the first evaluation that breaches the alarm updates the state to "FIRING".

    The alarm updates its status to "OK" when the breaching condition has been clear for the most recent minute.

    Example: PT5M

    query str

    (Updatable) The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see Editing the MQL Expression for a Query. For details about MQL, see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

    Example of threshold alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85


    Example of absence alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent()


    repeat_notification_duration str

    (Updatable) The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

    Default value: null (notifications are not re-submitted).

    Example: PT2H

    resolution str
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resource_group str
    (Updatable) Resource group that you want to match. A null value returns only metric data that has no resource groups. The alarm retrieves metric data associated with the specified resource group only. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Avoid entering confidential information. Example: frontend-fleet
    severity str
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    state str
    The current lifecycle state of the alarm. Example: DELETED
    suppression AlarmSuppressionArgs
    (Updatable) The configuration details for suppressing an alarm.
    time_created str
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    time_updated str
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    body String
    (Updatable) The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: High CPU usage alert. Follow runbook instructions for resolution.
    compartmentId String
    (Updatable) The OCID of the compartment containing the alarm.
    definedTags Map<Any>
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    destinations List<String>
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    displayName String

    (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    This value determines the title of each alarm notification.

    Example: High CPU Utilization

    freeformTags Map<Any>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    isEnabled Boolean
    (Updatable) Whether the alarm is enabled. Example: true
    isNotificationsPerMetricDimensionEnabled Boolean
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    messageFormat String
    (Updatable) The format to use for alarm notifications. The formats are:
    metricCompartmentId String
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    metricCompartmentIdInSubtree Boolean
    (Updatable) When true, the alarm evaluates metrics from all compartments and subcompartments. The parameter can only be set to true when metricCompartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, the alarm evaluates metrics from only the compartment specified in metricCompartmentId. Default is false. Example: true
    namespace String
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    pendingDuration String

    (Updatable) The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING". For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to "FIRING".

    The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M.

    Under the default value of PT1M, the first evaluation that breaches the alarm updates the state to "FIRING".

    The alarm updates its status to "OK" when the breaching condition has been clear for the most recent minute.

    Example: PT5M

    query String

    (Updatable) The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval depend on the specified time range. More interval values are supported for smaller time ranges. You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see Editing the MQL Expression for a Query. For details about MQL, see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

    Example of threshold alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85


    Example of absence alarm:


    CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent()


    repeatNotificationDuration String

    (Updatable) The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

    Default value: null (notifications are not re-submitted).

    Example: PT2H

    resolution String
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resourceGroup String
    (Updatable) Resource group that you want to match. A null value returns only metric data that has no resource groups. The alarm retrieves metric data associated with the specified resource group only. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Avoid entering confidential information. Example: frontend-fleet
    severity String
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    state String
    The current lifecycle state of the alarm. Example: DELETED
    suppression Property Map
    (Updatable) The configuration details for suppressing an alarm.
    timeCreated String
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeUpdated String
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z

    Supporting Types

    AlarmSuppression, AlarmSuppressionArgs

    TimeSuppressFrom string
    (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    TimeSuppressUntil string

    (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T02:02:29.600Z

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Description string

    (Updatable) Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    Oracle recommends including tracking information for the event or associated work, such as a ticket number.

    Example: Planned outage due to change IT-1234.

    TimeSuppressFrom string
    (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    TimeSuppressUntil string

    (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T02:02:29.600Z

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Description string

    (Updatable) Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    Oracle recommends including tracking information for the event or associated work, such as a ticket number.

    Example: Planned outage due to change IT-1234.

    timeSuppressFrom String
    (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeSuppressUntil String

    (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T02:02:29.600Z

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description String

    (Updatable) Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    Oracle recommends including tracking information for the event or associated work, such as a ticket number.

    Example: Planned outage due to change IT-1234.

    timeSuppressFrom string
    (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeSuppressUntil string

    (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T02:02:29.600Z

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description string

    (Updatable) Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    Oracle recommends including tracking information for the event or associated work, such as a ticket number.

    Example: Planned outage due to change IT-1234.

    time_suppress_from str
    (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    time_suppress_until str

    (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T02:02:29.600Z

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description str

    (Updatable) Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    Oracle recommends including tracking information for the event or associated work, such as a ticket number.

    Example: Planned outage due to change IT-1234.

    timeSuppressFrom String
    (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeSuppressUntil String

    (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T02:02:29.600Z

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description String

    (Updatable) Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    Oracle recommends including tracking information for the event or associated work, such as a ticket number.

    Example: Planned outage due to change IT-1234.

    Import

    Alarms can be imported using the id, e.g.

    $ pulumi import oci:Monitoring/alarm:Alarm test_alarm "id"
    

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.27.0 published on Friday, Mar 15, 2024 by Pulumi