@Generated(value="OracleSDKGenerator", comments="API Version: 20180401") public final class CreateAlarmDetails extends Object
The configuration details for creating an alarm.
*Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
Note: Objects should always be created or deserialized using the CreateAlarmDetails.Builder
. This model distinguishes fields
that are null
because they are unset from fields that are explicitly set to null
. This is done in
the setter methods of the CreateAlarmDetails.Builder
, which maintain a set of all explicitly set fields called
__explicitlySet__
. The hashCode()
and equals(Object)
methods are implemented to take
__explicitlySet__
into account. The constructor, on the other hand, does not set __explicitlySet__
(since the constructor cannot distinguish explicit null
from unset null
).
Modifier and Type | Class and Description |
---|---|
static class |
CreateAlarmDetails.Builder |
Constructor and Description |
---|
CreateAlarmDetails(String displayName,
String compartmentId,
String metricCompartmentId,
Boolean metricCompartmentIdInSubtree,
String namespace,
String resourceGroup,
String query,
String resolution,
String pendingDuration,
Alarm.Severity severity,
String body,
List<String> destinations,
String repeatNotificationDuration,
Suppression suppression,
Boolean isEnabled,
Map<String,String> freeformTags,
Map<String,Map<String,Object>> definedTags)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static CreateAlarmDetails.Builder |
builder()
Create a new builder.
|
boolean |
equals(Object o) |
Set<String> |
get__explicitlySet__() |
String |
getBody()
The human-readable content of the notification delivered.
|
String |
getCompartmentId()
The OCID of the compartment containing the alarm.
|
Map<String,Map<String,Object>> |
getDefinedTags()
Usage of predefined tag keys.
|
List<String> |
getDestinations()
A list of destinations to which the notifications for this alarm will be delivered.
|
String |
getDisplayName()
A user-friendly name for the alarm.
|
Map<String,String> |
getFreeformTags()
Simple key-value pair that is applied without any predefined name, type or scope.
|
Boolean |
getIsEnabled()
Whether the alarm is enabled.
|
String |
getMetricCompartmentId()
The OCID of the compartment containing the metric
being evaluated by the alarm.
|
Boolean |
getMetricCompartmentIdInSubtree()
When true, the alarm evaluates metrics from all compartments and subcompartments.
|
String |
getNamespace()
The source service or application emitting the metric that is evaluated by the alarm.
|
String |
getPendingDuration()
The period of time that the condition defined in the alarm must persist before the alarm state
changes from "OK" to "FIRING".
|
String |
getQuery()
The Monitoring Query Language (MQL) expression to evaluate for the alarm.
|
String |
getRepeatNotificationDuration()
The frequency at which notifications are re-submitted, if the alarm keeps firing without
interruption.
|
String |
getResolution()
The time between calculated aggregation windows for the alarm.
|
String |
getResourceGroup()
Resource group that you want to use as a filter.
|
Alarm.Severity |
getSeverity()
The perceived type of response required when the alarm is in the "FIRING" state.
|
Suppression |
getSuppression()
The configuration details for suppressing an alarm.
|
int |
hashCode() |
CreateAlarmDetails.Builder |
toBuilder() |
String |
toString() |
@ConstructorProperties(value={"displayName","compartmentId","metricCompartmentId","metricCompartmentIdInSubtree","namespace","resourceGroup","query","resolution","pendingDuration","severity","body","destinations","repeatNotificationDuration","suppression","isEnabled","freeformTags","definedTags"}) @Deprecated public CreateAlarmDetails(String displayName, String compartmentId, String metricCompartmentId, Boolean metricCompartmentIdInSubtree, String namespace, String resourceGroup, String query, String resolution, String pendingDuration, Alarm.Severity severity, String body, List<String> destinations, String repeatNotificationDuration, Suppression suppression, Boolean isEnabled, Map<String,String> freeformTags, Map<String,Map<String,Object>> definedTags)
public static CreateAlarmDetails.Builder builder()
Create a new builder.
public CreateAlarmDetails.Builder toBuilder()
public String getDisplayName()
A user-friendly name for the alarm. It does not have to be unique, and it’s changeable. Avoid entering confidential information.
This name is sent as the title for notifications related to this alarm.
Example: `High CPU Utilization`
public String getMetricCompartmentId()
The OCID of the compartment containing the metric being evaluated by the alarm.
public Boolean getMetricCompartmentIdInSubtree()
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`
public String getNamespace()
The source service or application emitting the metric that is evaluated by the alarm.
Example: `oci_computeagent`
public String getResourceGroup()
Resource group that you want to use as a filter. 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`
public String getQuery()
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: 1m
-60m
(also 1h
). 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.
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()
-----
public String getResolution()
The time between calculated aggregation windows for the alarm. Supported value: 1m
public String getPendingDuration()
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`
public Alarm.Severity getSeverity()
The perceived type of response required when the alarm is in the "FIRING" state.
Example: `CRITICAL`
public String getBody()
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.`
public List<String> getDestinations()
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.
public String getRepeatNotificationDuration()
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.
Default value: null (notifications are not re-submitted).
Example: `PT2H`
public Suppression getSuppression()
The configuration details for suppressing an alarm.
public Boolean getIsEnabled()
Whether the alarm is enabled.
Example: `true`
public Map<String,String> getFreeformTags()
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
Example: {\"Department\": \"Finance\"}
public Map<String,Map<String,Object>> getDefinedTags()
Usage of predefined tag keys. These predefined keys are scoped to namespaces.
Example: {\"Operations\": {\"CostCenter\": \"42\"}}
Copyright © 2016–2021. All rights reserved.