Class AlarmOverride
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.monitoring.model.AlarmOverride
-
@Generated(value="OracleSDKGenerator", comments="API Version: 20180401") public final class AlarmOverride extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
Values to use for an independent evaluation of the alarm.You 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)
Note: Objects should always be created or deserialized using theAlarmOverride.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 theAlarmOverride.Builder
, which maintain a set of all explicitly set fields calledAlarmOverride.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
AlarmOverride.Builder
-
Constructor Summary
Constructors Constructor Description AlarmOverride(String pendingDuration, Alarm.Severity severity, String body, String ruleName, String query)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AlarmOverride.Builder
builder()
Create a new builder.boolean
equals(Object o)
String
getBody()
The human-readable content of the delivered alarm notification.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
getRuleName()
A user-friendly description for this alarm override.Alarm.Severity
getSeverity()
The perceived severity of the alarm with regard to the affected system.int
hashCode()
AlarmOverride.Builder
toBuilder()
String
toString()
String
toString(boolean includeByteArrayContents)
Return a string representation of the object.
-
-
-
Constructor Detail
-
AlarmOverride
@Deprecated @ConstructorProperties({"pendingDuration","severity","body","ruleName","query"}) public AlarmOverride(String pendingDuration, Alarm.Severity severity, String body, String ruleName, String query)
Deprecated.
-
-
Method Detail
-
builder
public static AlarmOverride.Builder builder()
Create a new builder.
-
toBuilder
public AlarmOverride.Builder toBuilder()
-
getPendingDuration
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
- Returns:
- the value
-
getSeverity
public Alarm.Severity getSeverity()
The perceived severity of the alarm with regard to the affected system.Example: CRITICAL
- Returns:
- the value
-
getBody
public String getBody()
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.
Example: High CPU usage alert. Follow runbook instructions for resolution.
- Returns:
- the value
-
getRuleName
public String getRuleName()
A user-friendly description for this alarm override.Must be unique across all ruleName values for the alarm.
- 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. You can optionally specify dimensions and grouping functions. Also, you can customize the absence detection period. 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()
----- Example of absence alarm with custom absence detection period of 20 hours:
-----
CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent(20h)
-----
- 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
-
-