oci.Monitoring.Alarm
This resource provides the Alarm resource in Oracle Cloud Infrastructure Monitoring service.
Creates a new alarm in the specified compartment. 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
using System.Collections.Generic;
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 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.AnyMap{
"Operations.CostCenter": pulumi.Any("42"),
},
FreeformTags: pulumi.AnyMap{
"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.AlarmSuppressionArgs{
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
})
}
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());
}
}
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"],
))
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,
},
});
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)
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:
- Compartment
Id string (Updatable) The OCID of the compartment containing the alarm.
- Destinations List<string>
(Updatable) A list of destinations to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.
- Display
Name string (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- Is
Enabled bool (Updatable) Whether the alarm is enabled. Example:
true
- Metric
Compartment stringId (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 details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.- 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 notification delivered. 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.
- Dictionary<string, object>
(Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example:
{"Operations.CostCenter": "42"}
- 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"}
- Is
Notifications boolPer Metric Dimension Enabled (Updatable) When set to
true
, splits notifications per metric stream. When set tofalse
, groups notifications across metric streams. Example:true
- Message
Format string (Updatable) The format to use for notification messages sent from this alarm. The formats are:
- Metric
Compartment boolId In Subtree (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 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".
- Repeat
Notification stringDuration (Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example,
PT4H
indicates four hours. Minimum: PT1M. Maximum: P30D.- Resolution string
(Updatable) The time between calculated aggregation windows for the alarm. Supported value:
1m
- Resource
Group 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
Alarm
Suppression Args (Updatable) The configuration details for suppressing an alarm.
- Compartment
Id string (Updatable) The OCID of the compartment containing the alarm.
- Destinations []string
(Updatable) A list of destinations to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.
- Display
Name string (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- Is
Enabled bool (Updatable) Whether the alarm is enabled. Example:
true
- Metric
Compartment stringId (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 details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.- 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 notification delivered. 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.
- map[string]interface{}
(Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example:
{"Operations.CostCenter": "42"}
- 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"}
- Is
Notifications boolPer Metric Dimension Enabled (Updatable) When set to
true
, splits notifications per metric stream. When set tofalse
, groups notifications across metric streams. Example:true
- Message
Format string (Updatable) The format to use for notification messages sent from this alarm. The formats are:
- Metric
Compartment boolId In Subtree (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 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".
- Repeat
Notification stringDuration (Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example,
PT4H
indicates four hours. Minimum: PT1M. Maximum: P30D.- Resolution string
(Updatable) The time between calculated aggregation windows for the alarm. Supported value:
1m
- Resource
Group 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
Alarm
Suppression Args (Updatable) The configuration details for suppressing an alarm.
- compartment
Id String (Updatable) The OCID of the compartment containing the alarm.
- destinations List<String>
(Updatable) A list of destinations to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.
- display
Name String (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- is
Enabled Boolean (Updatable) Whether the alarm is enabled. Example:
true
- metric
Compartment StringId (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 details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.- 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 notification delivered. 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.
- Map<String,Object>
(Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example:
{"Operations.CostCenter": "42"}
- 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"}
- is
Notifications BooleanPer Metric Dimension Enabled (Updatable) When set to
true
, splits notifications per metric stream. When set tofalse
, groups notifications across metric streams. Example:true
- message
Format String (Updatable) The format to use for notification messages sent from this alarm. The formats are:
- metric
Compartment BooleanId In Subtree (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 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".
- repeat
Notification StringDuration (Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example,
PT4H
indicates four hours. Minimum: PT1M. Maximum: P30D.- resolution String
(Updatable) The time between calculated aggregation windows for the alarm. Supported value:
1m
- resource
Group 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
Alarm
Suppression Args (Updatable) The configuration details for suppressing an alarm.
- compartment
Id string (Updatable) The OCID of the compartment containing the alarm.
- destinations string[]
(Updatable) A list of destinations to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.
- display
Name string (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- is
Enabled boolean (Updatable) Whether the alarm is enabled. Example:
true
- metric
Compartment stringId (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 details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.- 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 notification delivered. 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.
- {[key: string]: any}
(Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example:
{"Operations.CostCenter": "42"}
- {[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"}
- is
Notifications booleanPer Metric Dimension Enabled (Updatable) When set to
true
, splits notifications per metric stream. When set tofalse
, groups notifications across metric streams. Example:true
- message
Format string (Updatable) The format to use for notification messages sent from this alarm. The formats are:
- metric
Compartment booleanId In Subtree (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 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".
- repeat
Notification stringDuration (Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example,
PT4H
indicates four hours. Minimum: PT1M. Maximum: P30D.- resolution string
(Updatable) The time between calculated aggregation windows for the alarm. Supported value:
1m
- resource
Group 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
Alarm
Suppression Args (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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. 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.
- is_
enabled bool (Updatable) Whether the alarm is enabled. Example:
true
- metric_
compartment_ strid (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 details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.- 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 notification delivered. 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.
- Mapping[str, Any]
(Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example:
{"Operations.CostCenter": "42"}
- 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_ boolper_ metric_ dimension_ enabled (Updatable) When set to
true
, splits notifications per metric stream. When set tofalse
, groups notifications across metric streams. Example:true
- message_
format str (Updatable) The format to use for notification messages sent from this alarm. The formats are:
- metric_
compartment_ boolid_ in_ subtree (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".
- repeat_
notification_ strduration (Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example,
PT4H
indicates four hours. Minimum: PT1M. Maximum: P30D.- 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
Alarm
Suppression Args (Updatable) The configuration details for suppressing an alarm.
- compartment
Id String (Updatable) The OCID of the compartment containing the alarm.
- destinations List<String>
(Updatable) A list of destinations to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.
- display
Name String (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- is
Enabled Boolean (Updatable) Whether the alarm is enabled. Example:
true
- metric
Compartment StringId (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 details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.- 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 notification delivered. 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.
- Map<Any>
(Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example:
{"Operations.CostCenter": "42"}
- 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"}
- is
Notifications BooleanPer Metric Dimension Enabled (Updatable) When set to
true
, splits notifications per metric stream. When set tofalse
, groups notifications across metric streams. Example:true
- message
Format String (Updatable) The format to use for notification messages sent from this alarm. The formats are:
- metric
Compartment BooleanId In Subtree (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 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".
- repeat
Notification StringDuration (Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example,
PT4H
indicates four hours. Minimum: PT1M. Maximum: P30D.- resolution String
(Updatable) The time between calculated aggregation windows for the alarm. Supported value:
1m
- resource
Group 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
- Time
Created string The date and time the alarm was created. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- Time
Updated string The date and time the alarm was last updated. Format defined by RFC3339. Example:
2019-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
- Time
Created string The date and time the alarm was created. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- Time
Updated string The date and time the alarm was last updated. Format defined by RFC3339. Example:
2019-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
- time
Created String The date and time the alarm was created. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- time
Updated String The date and time the alarm was last updated. Format defined by RFC3339. Example:
2019-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
- time
Created string The date and time the alarm was created. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- time
Updated string The date and time the alarm was last updated. Format defined by RFC3339. Example:
2019-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:
2019-02-01T01:02:29.600Z
- time_
updated str The date and time the alarm was last updated. Format defined by RFC3339. Example:
2019-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
- time
Created String The date and time the alarm was created. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- time
Updated String The date and time the alarm was last updated. Format defined by RFC3339. Example:
2019-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.
- Body string
(Updatable) The human-readable content of the notification delivered. 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 string (Updatable) The OCID of the compartment containing the alarm.
- 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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.
- Display
Name string (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- 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"}
- Is
Enabled bool (Updatable) Whether the alarm is enabled. Example:
true
- Is
Notifications boolPer Metric Dimension Enabled (Updatable) When set to
true
, splits notifications per metric stream. When set tofalse
, groups notifications across metric streams. Example:true
- Message
Format string (Updatable) The format to use for notification messages sent from this alarm. The formats are:
- Metric
Compartment stringId (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
- Metric
Compartment boolId In Subtree (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
- Pending
Duration 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".
- 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 details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.- Repeat
Notification stringDuration (Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example,
PT4H
indicates four hours. Minimum: PT1M. Maximum: P30D.- Resolution string
(Updatable) The time between calculated aggregation windows for the alarm. Supported value:
1m
- Resource
Group 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
Alarm
Suppression Args (Updatable) The configuration details for suppressing an alarm.
- Time
Created string The date and time the alarm was created. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- Time
Updated string The date and time the alarm was last updated. Format defined by RFC3339. Example:
2019-02-03T01:02:29.600Z
- Body string
(Updatable) The human-readable content of the notification delivered. 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 string (Updatable) The OCID of the compartment containing the alarm.
- 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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.
- Display
Name string (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- 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"}
- Is
Enabled bool (Updatable) Whether the alarm is enabled. Example:
true
- Is
Notifications boolPer Metric Dimension Enabled (Updatable) When set to
true
, splits notifications per metric stream. When set tofalse
, groups notifications across metric streams. Example:true
- Message
Format string (Updatable) The format to use for notification messages sent from this alarm. The formats are:
- Metric
Compartment stringId (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
- Metric
Compartment boolId In Subtree (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
- Pending
Duration 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".
- 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 details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.- Repeat
Notification stringDuration (Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example,
PT4H
indicates four hours. Minimum: PT1M. Maximum: P30D.- Resolution string
(Updatable) The time between calculated aggregation windows for the alarm. Supported value:
1m
- Resource
Group 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
Alarm
Suppression Args (Updatable) The configuration details for suppressing an alarm.
- Time
Created string The date and time the alarm was created. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- Time
Updated string The date and time the alarm was last updated. Format defined by RFC3339. Example:
2019-02-03T01:02:29.600Z
- body String
(Updatable) The human-readable content of the notification delivered. 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 String (Updatable) The OCID of the compartment containing the alarm.
- 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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.
- display
Name String (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- 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"}
- is
Enabled Boolean (Updatable) Whether the alarm is enabled. Example:
true
- is
Notifications BooleanPer Metric Dimension Enabled (Updatable) When set to
true
, splits notifications per metric stream. When set tofalse
, groups notifications across metric streams. Example:true
- message
Format String (Updatable) The format to use for notification messages sent from this alarm. The formats are:
- metric
Compartment StringId (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
- metric
Compartment BooleanId In Subtree (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
- pending
Duration 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".
- 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 details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.- repeat
Notification StringDuration (Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example,
PT4H
indicates four hours. Minimum: PT1M. Maximum: P30D.- resolution String
(Updatable) The time between calculated aggregation windows for the alarm. Supported value:
1m
- resource
Group 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
Alarm
Suppression Args (Updatable) The configuration details for suppressing an alarm.
- time
Created String The date and time the alarm was created. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- time
Updated String The date and time the alarm was last updated. Format defined by RFC3339. Example:
2019-02-03T01:02:29.600Z
- body string
(Updatable) The human-readable content of the notification delivered. 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 string (Updatable) The OCID of the compartment containing the alarm.
- {[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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.
- display
Name string (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- {[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"}
- is
Enabled boolean (Updatable) Whether the alarm is enabled. Example:
true
- is
Notifications booleanPer Metric Dimension Enabled (Updatable) When set to
true
, splits notifications per metric stream. When set tofalse
, groups notifications across metric streams. Example:true
- message
Format string (Updatable) The format to use for notification messages sent from this alarm. The formats are:
- metric
Compartment stringId (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
- metric
Compartment booleanId In Subtree (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
- pending
Duration 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".
- 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 details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.- repeat
Notification stringDuration (Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example,
PT4H
indicates four hours. Minimum: PT1M. Maximum: P30D.- resolution string
(Updatable) The time between calculated aggregation windows for the alarm. Supported value:
1m
- resource
Group 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
Alarm
Suppression Args (Updatable) The configuration details for suppressing an alarm.
- time
Created string The date and time the alarm was created. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- time
Updated string The date and time the alarm was last updated. Format defined by RFC3339. Example:
2019-02-03T01:02:29.600Z
- body str
(Updatable) The human-readable content of the notification delivered. 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.
- 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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. 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.
- 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_ boolper_ metric_ dimension_ enabled (Updatable) When set to
true
, splits notifications per metric stream. When set tofalse
, groups notifications across metric streams. Example:true
- message_
format str (Updatable) The format to use for notification messages sent from this alarm. The formats are:
- metric_
compartment_ strid (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
- metric_
compartment_ boolid_ in_ subtree (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".
- 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 details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.- repeat_
notification_ strduration (Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example,
PT4H
indicates four hours. Minimum: PT1M. Maximum: P30D.- 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
Alarm
Suppression Args (Updatable) The configuration details for suppressing an alarm.
- time_
created str The date and time the alarm was created. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- time_
updated str The date and time the alarm was last updated. Format defined by RFC3339. Example:
2019-02-03T01:02:29.600Z
- body String
(Updatable) The human-readable content of the notification delivered. 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 String (Updatable) The OCID of the compartment containing the alarm.
- 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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.
- display
Name String (Updatable) A user-friendly name for the alarm. It does not have to be unique, and it's changeable. Avoid entering confidential information.
- 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"}
- is
Enabled Boolean (Updatable) Whether the alarm is enabled. Example:
true
- is
Notifications BooleanPer Metric Dimension Enabled (Updatable) When set to
true
, splits notifications per metric stream. When set tofalse
, groups notifications across metric streams. Example:true
- message
Format String (Updatable) The format to use for notification messages sent from this alarm. The formats are:
- metric
Compartment StringId (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
- metric
Compartment BooleanId In Subtree (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
- pending
Duration 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".
- 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 details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.- repeat
Notification StringDuration (Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example,
PT4H
indicates four hours. Minimum: PT1M. Maximum: P30D.- resolution String
(Updatable) The time between calculated aggregation windows for the alarm. Supported value:
1m
- resource
Group 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.
- time
Created String The date and time the alarm was created. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- time
Updated String The date and time the alarm was last updated. Format defined by RFC3339. Example:
2019-02-03T01:02:29.600Z
Supporting Types
AlarmSuppression
- Time
Suppress stringFrom (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- Time
Suppress stringUntil (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example:
2019-02-01T02:02:29.600Z
- 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.
- Time
Suppress stringFrom (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- Time
Suppress stringUntil (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example:
2019-02-01T02:02:29.600Z
- 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.
- time
Suppress StringFrom (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- time
Suppress StringUntil (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example:
2019-02-01T02:02:29.600Z
- 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.
- time
Suppress stringFrom (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- time
Suppress stringUntil (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example:
2019-02-01T02:02:29.600Z
- 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.
- time_
suppress_ strfrom (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- time_
suppress_ struntil (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example:
2019-02-01T02:02:29.600Z
- 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.
- time
Suppress StringFrom (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example:
2019-02-01T01:02:29.600Z
- time
Suppress StringUntil (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example:
2019-02-01T02:02:29.600Z
- 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.
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.