Class AlarmSummary
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.monitoring.model.AlarmSummary
-
@Generated(value="OracleSDKGenerator", comments="API Version: 20180401") public final class AlarmSummary extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
A summary of properties for the specified 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](https://docs.oracle.com/iaas/Content/Identity/Concepts/policygetstarted.htm).
For information about endpoints and signing API requests, see [About the API](https://docs.oracle.com/iaas/Content/API/Concepts/usingapi.htm). For information about available SDKs and tools, see [SDKS and Other Tools](https://docs.oracle.com/iaas/Content/API/Concepts/sdks.htm).
Note: Objects should always be created or deserialized using theAlarmSummary.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 theAlarmSummary.Builder
, which maintain a set of all explicitly set fields calledAlarmSummary.Builder.__explicitlySet__
. ThehashCode()
andequals(Object)
methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AlarmSummary.Builder
static class
AlarmSummary.Severity
The perceived type of response required when the alarm is in the “FIRING” state.
-
Constructor Summary
Constructors Constructor Description AlarmSummary(String id, String displayName, String compartmentId, String metricCompartmentId, String namespace, String query, AlarmSummary.Severity severity, List<String> destinations, Suppression suppression, Boolean isEnabled, Boolean isNotificationsPerMetricDimensionEnabled, Map<String,String> freeformTags, Map<String,Map<String,Object>> definedTags, Alarm.LifecycleState lifecycleState, List<AlarmOverride> overrides, String ruleName, String notificationVersion, String notificationTitle, String evaluationSlackDuration, String alarmSummary, String resourceGroup)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AlarmSummary.Builder
builder()
Create a new builder.boolean
equals(Object o)
String
getAlarmSummary()
Customizable alarm summary (alarmSummary alarm message parameter).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 for alarm notifications.String
getDisplayName()
A user-friendly name for the alarm.String
getEvaluationSlackDuration()
Customizable slack period to wait for metric ingestion before evaluating the alarm.Map<String,String>
getFreeformTags()
Simple key-value pair that is applied without any predefined name, type or scope.String
getId()
The OCID of the alarm.Boolean
getIsEnabled()
Whether the alarm is enabled.Boolean
getIsNotificationsPerMetricDimensionEnabled()
Whether the alarm sends a separate message for each metric stream.Alarm.LifecycleState
getLifecycleState()
The current lifecycle state of the alarm.String
getMetricCompartmentId()
The OCID of the compartment containing the metric being evaluated by the alarm.String
getNamespace()
The source service or application emitting the metric that is evaluated by the alarm.String
getNotificationTitle()
Customizable notification title (title alarm message parameter).String
getNotificationVersion()
The version of the alarm notification to be delivered.List<AlarmOverride>
getOverrides()
A set of overrides that control evaluations of the alarm.String
getQuery()
The Monitoring Query Language (MQL) expression to evaluate for the alarm.String
getResourceGroup()
Resource group that you want to match.String
getRuleName()
Identifier of the alarm’s base values for alarm evaluation, for use when the alarm contains overrides.AlarmSummary.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()
AlarmSummary.Builder
toBuilder()
String
toString()
String
toString(boolean includeByteArrayContents)
Return a string representation of the object.
-
-
-
Constructor Detail
-
AlarmSummary
@Deprecated @ConstructorProperties({"id","displayName","compartmentId","metricCompartmentId","namespace","query","severity","destinations","suppression","isEnabled","isNotificationsPerMetricDimensionEnabled","freeformTags","definedTags","lifecycleState","overrides","ruleName","notificationVersion","notificationTitle","evaluationSlackDuration","alarmSummary","resourceGroup"}) public AlarmSummary(String id, String displayName, String compartmentId, String metricCompartmentId, String namespace, String query, AlarmSummary.Severity severity, List<String> destinations, Suppression suppression, Boolean isEnabled, Boolean isNotificationsPerMetricDimensionEnabled, Map<String,String> freeformTags, Map<String,Map<String,Object>> definedTags, Alarm.LifecycleState lifecycleState, List<AlarmOverride> overrides, String ruleName, String notificationVersion, String notificationTitle, String evaluationSlackDuration, String alarmSummary, String resourceGroup)
Deprecated.
-
-
Method Detail
-
builder
public static AlarmSummary.Builder builder()
Create a new builder.
-
toBuilder
public AlarmSummary.Builder toBuilder()
-
getDisplayName
public String getDisplayName()
A user-friendly name for the alarm.It does not have to be unique, and it’s changeable.
This value determines the title of each alarm notification.
Example: High CPU Utilization
- Returns:
- the value
-
getCompartmentId
public String getCompartmentId()
The OCID of the compartment containing the alarm.- Returns:
- the value
-
getMetricCompartmentId
public String getMetricCompartmentId()
The OCID of the compartment containing the metric being evaluated by the alarm.- Returns:
- the value
-
getNamespace
public String getNamespace()
The source service or application emitting the metric that is evaluated by the alarm.Example: oci_computeagent
- Returns:
- the value
-
getQuery
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 depend on the specified time range. More interval values are supported for smaller time ranges. Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see Editing the MQL Expression for a Query. For details about MQL, see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.
Example of threshold alarm:
-----
CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85
-----
Example of absence alarm:
-----
CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent()
-----
- Returns:
- the value
-
getSeverity
public AlarmSummary.Severity getSeverity()
The perceived type of response required when the alarm is in the “FIRING” state.Example: CRITICAL
- Returns:
- the value
-
getDestinations
public List<String> getDestinations()
A list of destinations for alarm notifications.Each destination is represented by the OCID of a related resource, such as a
NotificationTopic
. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.- Returns:
- the value
-
getSuppression
public Suppression getSuppression()
The configuration details for suppressing an alarm.- Returns:
- the value
-
getIsEnabled
public Boolean getIsEnabled()
Whether the alarm is enabled.Example: true
- Returns:
- the value
-
getIsNotificationsPerMetricDimensionEnabled
public Boolean getIsNotificationsPerMetricDimensionEnabled()
Whether the alarm sends a separate message for each metric stream.See Creating an Alarm That Splits Messages by Metric Stream. Example: true
- Returns:
- the value
-
getFreeformTags
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”}
- Returns:
- the value
-
getDefinedTags
public Map<String,Map<String,Object>> getDefinedTags()
Usage of predefined tag keys.These predefined keys are scoped to namespaces. Example: {“Operations”: {“CostCenter”: “42”}}
- Returns:
- the value
-
getLifecycleState
public Alarm.LifecycleState getLifecycleState()
The current lifecycle state of the alarm.Example: DELETED
- Returns:
- the value
-
getOverrides
public List<AlarmOverride> getOverrides()
A set of overrides that control evaluations of the alarm.Each override can specify values for query, severity, body, and pending duration. When an alarm contains overrides, the Monitoring service evaluates each override in order, beginning with the first override in the array (index position 0), and then evaluates the alarm's base values (ruleName value of BASE).
- Returns:
- the value
-
getRuleName
public String getRuleName()
Identifier of the alarm’s base values for alarm evaluation, for use when the alarm contains overrides.Default value is BASE. For information about alarm overrides, see
alarmOverride
.- Returns:
- the value
-
getNotificationVersion
public String getNotificationVersion()
The version of the alarm notification to be delivered.Allowed value: 1.X The value must start with a number (up to four digits), followed by a period and an uppercase X.
- Returns:
- the value
-
getNotificationTitle
public String getNotificationTitle()
Customizable notification title (title alarm message parameter).Optionally include dynamic variables. The notification title appears as the subject line in a formatted email message and as the title in a Slack message.
- Returns:
- the value
-
getEvaluationSlackDuration
public String getEvaluationSlackDuration()
Customizable slack period to wait for metric ingestion before evaluating the alarm.Specify a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT3M. Maximum: PT2H. Default: PT3M. For more information about the slack period, see About the Internal Reset Period.
- Returns:
- the value
-
getAlarmSummary
public String getAlarmSummary()
Customizable alarm summary (alarmSummary alarm message parameter).Optionally include dynamic variables. The alarm summary appears within the body of the alarm message and in responses to
listAlarmsStatus
getAlarmHistory
andretrieveDimensionStates
.- Returns:
- the value
-
getResourceGroup
public String getResourceGroup()
Resource group that you want to match.A null value returns only metric data that has no resource groups. The specified resource group must exist in the definition of the posted metric. 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 ($).
Example: frontend-fleet
- Returns:
- the value
-
toString
public String toString()
- Overrides:
toString
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
toString
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.- Parameters:
includeByteArrayContents
- true to include the full contents of byte arrays- Returns:
- string representation
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
-