Class Alarm
The properties that define an alarm.
For information about alarms, see
Alarms Overview.
To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized,
talk to an administrator. If you're an administrator who needs to write policies to give users access, see
Getting Started with Policies.
For information about endpoints and signing API requests, see
About the API.
For information about available SDKs and tools, see
SDKS and Other Tools.
Inherited Members
Namespace: Oci.MonitoringService.Models
Assembly: OCI.DotNetSDK.Monitoring.dll
Syntax
public class Alarm
Properties
AlarmSummary
Declaration
[JsonProperty(PropertyName = "alarmSummary")]
public string AlarmSummary { get; set; }
Property Value
Type | Description |
---|---|
string | Customizable alarm summary ( |
Body
Declaration
[JsonProperty(PropertyName = "body")]
public string Body { get; set; }
Property Value
Type | Description |
---|---|
string | The human-readable content of the delivered alarm notification.
Optionally include dynamic variables.
Oracle recommends providing guidance
to operators for resolving the alarm condition. Consider adding links to standard runbook
practices. Avoid entering confidential information.
|
CompartmentId
Declaration
[Required(ErrorMessage = "CompartmentId is required.")]
[JsonProperty(PropertyName = "compartmentId")]
public string CompartmentId { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the compartment containing the alarm. |
Remarks
Required
DefinedTags
Declaration
[JsonProperty(PropertyName = "definedTags")]
public Dictionary<string, Dictionary<string, object>> DefinedTags { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, Dictionary<string, object>> | Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations": {"CostCenter": "42"}} |
Destinations
Declaration
[Required(ErrorMessage = "Destinations is required.")]
[JsonProperty(PropertyName = "destinations")]
public List<string> Destinations { get; set; }
Property Value
Type | Description |
---|---|
List<string> | A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a {@link NotificationTopic}. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service. |
Remarks
Required
DisplayName
Declaration
[Required(ErrorMessage = "DisplayName is required.")]
[JsonProperty(PropertyName = "displayName")]
public string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
string | A user-friendly name for the alarm. It does not have to be unique, and it's changeable.
|
Remarks
Required
EvaluationSlackDuration
Declaration
[JsonProperty(PropertyName = "evaluationSlackDuration")]
public string EvaluationSlackDuration { get; set; }
Property Value
Type | Description |
---|---|
string | Customizable slack period to wait for metric ingestion before evaluating the alarm.
Specify a string in ISO 8601 format ( |
FreeformTags
Declaration
[JsonProperty(PropertyName = "freeformTags")]
public Dictionary<string, string> FreeformTags { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, string> | Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"} |
Id
Declaration
[Required(ErrorMessage = "Id is required.")]
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the alarm. |
Remarks
Required
IsEnabled
Declaration
[Required(ErrorMessage = "IsEnabled is required.")]
[JsonProperty(PropertyName = "isEnabled")]
public bool? IsEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool? | Whether the alarm is enabled.
|
Remarks
Required
IsNotificationsPerMetricDimensionEnabled
Declaration
[JsonProperty(PropertyName = "isNotificationsPerMetricDimensionEnabled")]
public bool? IsNotificationsPerMetricDimensionEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool? | When set to |
LifecycleState
Declaration
[Required(ErrorMessage = "LifecycleState is required.")]
[JsonProperty(PropertyName = "lifecycleState")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Alarm.LifecycleStateEnum? LifecycleState { get; set; }
Property Value
Type | Description |
---|---|
Alarm.LifecycleStateEnum? | The current lifecycle state of the alarm.
|
Remarks
Required
MessageFormat
Declaration
[JsonProperty(PropertyName = "messageFormat")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Alarm.MessageFormatEnum? MessageFormat { get; set; }
Property Value
Type | Description |
---|---|
Alarm.MessageFormatEnum? | The format to use for alarm notifications. The formats are:
|
MetricCompartmentId
Declaration
[Required(ErrorMessage = "MetricCompartmentId is required.")]
[JsonProperty(PropertyName = "metricCompartmentId")]
public string MetricCompartmentId { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the compartment containing the metric being evaluated by the alarm. |
Remarks
Required
MetricCompartmentIdInSubtree
Declaration
[JsonProperty(PropertyName = "metricCompartmentIdInSubtree")]
public bool? MetricCompartmentIdInSubtree { get; set; }
Property Value
Type | Description |
---|---|
bool? | 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.
|
Namespace
Declaration
[Required(ErrorMessage = "Namespace is required.")]
[JsonProperty(PropertyName = "namespace")]
public string Namespace { get; set; }
Property Value
Type | Description |
---|---|
string | The source service or application emitting the metric that is evaluated by the alarm.
|
Remarks
Required
NotificationTitle
Declaration
[JsonProperty(PropertyName = "notificationTitle")]
public string NotificationTitle { get; set; }
Property Value
Type | Description |
---|---|
string | Customizable notification title ( |
NotificationVersion
Declaration
[JsonProperty(PropertyName = "notificationVersion")]
public string NotificationVersion { get; set; }
Property Value
Type | Description |
---|---|
string | The version of the alarm notification to be delivered. Allowed value: |
Overrides
Declaration
[JsonProperty(PropertyName = "overrides")]
public List<AlarmOverride> Overrides { get; set; }
Property Value
Type | Description |
---|---|
List<AlarmOverride> | A set of overrides that control evaluations of the alarm.
|
PendingDuration
Declaration
[JsonProperty(PropertyName = "pendingDuration")]
public string PendingDuration { get; set; }
Property Value
Type | Description |
---|---|
string | 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
Declaration
[Required(ErrorMessage = "Query is required.")]
[JsonProperty(PropertyName = "query")]
public string Query { get; set; }
Property Value
Type | Description |
---|---|
string | 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.
Also, you can customize the
absence detection period.
Supported grouping functions:
|
Remarks
Required
RepeatNotificationDuration
Declaration
[JsonProperty(PropertyName = "repeatNotificationDuration")]
public string RepeatNotificationDuration { get; set; }
Property Value
Type | Description |
---|---|
string | The frequency for re-submitting alarm notifications, if the alarm keeps firing without
interruption. Format defined by ISO 8601. For example, |
Resolution
Declaration
[JsonProperty(PropertyName = "resolution")]
public string Resolution { get; set; }
Property Value
Type | Description |
---|---|
string | The time between calculated aggregation windows for the alarm. Supported value: |
ResourceGroup
Declaration
[JsonProperty(PropertyName = "resourceGroup")]
public string ResourceGroup { get; set; }
Property Value
Type | Description |
---|---|
string | Resource group to match for metric data retrieved by the alarm. A resource group is a custom string that you can match when retrieving custom metrics. 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 ($).
|
RuleName
Declaration
[JsonProperty(PropertyName = "ruleName")]
public string RuleName { get; set; }
Property Value
Type | Description |
---|---|
string | Identifier of the alarm's base values for alarm evaluation, for use when the alarm contains overrides.
Default value is |
Severity
Declaration
[Required(ErrorMessage = "Severity is required.")]
[JsonProperty(PropertyName = "severity")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Alarm.SeverityEnum? Severity { get; set; }
Property Value
Type | Description |
---|---|
Alarm.SeverityEnum? | The perceived type of response required when the alarm is in the "FIRING" state.
|
Remarks
Required
Suppression
Declaration
[JsonProperty(PropertyName = "suppression")]
public Suppression Suppression { get; set; }
Property Value
Type | Description |
---|---|
Suppression | The configuration details for suppressing an alarm. |
TimeCreated
Declaration
[Required(ErrorMessage = "TimeCreated is required.")]
[JsonProperty(PropertyName = "timeCreated")]
public DateTime? TimeCreated { get; set; }
Property Value
Type | Description |
---|---|
DateTime? | The date and time the alarm was created. Format defined by RFC3339.
|
Remarks
Required
TimeUpdated
Declaration
[Required(ErrorMessage = "TimeUpdated is required.")]
[JsonProperty(PropertyName = "timeUpdated")]
public DateTime? TimeUpdated { get; set; }
Property Value
Type | Description |
---|---|
DateTime? | The date and time the alarm was last updated. Format defined by RFC3339.
|
Remarks
Required