public static class AlarmSummary.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
AlarmSummary.Builder |
alarmSummary(String alarmSummary)
Customizable alarm summary (
alarmSummary alarm message
parameter). |
AlarmSummary |
build() |
AlarmSummary.Builder |
compartmentId(String compartmentId)
The OCID
of the compartment containing the alarm.
|
AlarmSummary.Builder |
copy(AlarmSummary model) |
AlarmSummary.Builder |
definedTags(Map<String,Map<String,Object>> definedTags)
Usage of predefined tag keys.
|
AlarmSummary.Builder |
destinations(List<String> destinations)
A list of destinations for alarm notifications.
|
AlarmSummary.Builder |
displayName(String displayName)
A user-friendly name for the alarm.
|
AlarmSummary.Builder |
evaluationSlackDuration(String evaluationSlackDuration)
Customizable slack period to wait for metric ingestion before evaluating the alarm.
|
AlarmSummary.Builder |
freeformTags(Map<String,String> freeformTags)
Simple key-value pair that is applied without any predefined name, type or scope.
|
AlarmSummary.Builder |
id(String id)
The OCID
of the alarm.
|
AlarmSummary.Builder |
isEnabled(Boolean isEnabled)
Whether the alarm is enabled.
|
AlarmSummary.Builder |
isNotificationsPerMetricDimensionEnabled(Boolean isNotificationsPerMetricDimensionEnabled)
Whether the alarm sends a separate message for each metric stream.
|
AlarmSummary.Builder |
lifecycleState(Alarm.LifecycleState lifecycleState)
The current lifecycle state of the alarm.
|
AlarmSummary.Builder |
metricCompartmentId(String metricCompartmentId)
The OCID
of the compartment containing the metric being evaluated by the alarm.
|
AlarmSummary.Builder |
namespace(String namespace)
The source service or application emitting the metric that is evaluated by the alarm.
|
AlarmSummary.Builder |
notificationTitle(String notificationTitle)
Customizable notification title (
title alarm message
parameter). |
AlarmSummary.Builder |
notificationVersion(String notificationVersion)
The version of the alarm notification to be delivered.
|
AlarmSummary.Builder |
overrides(List<AlarmOverride> overrides)
A set of overrides that control evaluations of the alarm.
|
AlarmSummary.Builder |
query(String query)
The Monitoring Query Language (MQL) expression to evaluate for the alarm.
|
AlarmSummary.Builder |
resourceGroup(String resourceGroup)
Resource group that you want to match.
|
AlarmSummary.Builder |
ruleName(String ruleName)
Identifier of the alarm’s base values for alarm evaluation, for use when the alarm
contains overrides.
|
AlarmSummary.Builder |
severity(AlarmSummary.Severity severity)
The perceived type of response required when the alarm is in the “FIRING” state.
|
AlarmSummary.Builder |
suppression(Suppression suppression)
The configuration details for suppressing an alarm.
|
public AlarmSummary.Builder id(String id)
The OCID of the alarm.
id
- the value to setpublic AlarmSummary.Builder displayName(String displayName)
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
displayName
- the value to setpublic AlarmSummary.Builder compartmentId(String compartmentId)
The OCID of the compartment containing the alarm.
compartmentId
- the value to setpublic AlarmSummary.Builder metricCompartmentId(String metricCompartmentId)
The OCID of the compartment containing the metric being evaluated by the alarm.
metricCompartmentId
- the value to setpublic AlarmSummary.Builder namespace(String namespace)
The source service or application emitting the metric that is evaluated by the alarm.
Example: oci_computeagent
namespace
- the value to setpublic AlarmSummary.Builder query(String query)
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()
-----
query
- the value to setpublic AlarmSummary.Builder severity(AlarmSummary.Severity severity)
The perceived type of response required when the alarm is in the “FIRING” state.
Example: CRITICAL
severity
- the value to setpublic AlarmSummary.Builder destinations(List<String> destinations)
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.
destinations
- the value to setpublic AlarmSummary.Builder suppression(Suppression suppression)
The configuration details for suppressing an alarm.
suppression
- the value to setpublic AlarmSummary.Builder isEnabled(Boolean isEnabled)
Whether the alarm is enabled.
Example: true
isEnabled
- the value to setpublic AlarmSummary.Builder isNotificationsPerMetricDimensionEnabled(Boolean isNotificationsPerMetricDimensionEnabled)
Whether the alarm sends a separate message for each metric stream. See Creating an Alarm
That Splits Messages by Metric
Stream.
Example: true
isNotificationsPerMetricDimensionEnabled
- the value to setpublic AlarmSummary.Builder freeformTags(Map<String,String> freeformTags)
Simple key-value pair that is applied without any predefined name, type or scope. Exists
for cross-compatibility only. Example: {"Department": "Finance"}
freeformTags
- the value to setpublic AlarmSummary.Builder definedTags(Map<String,Map<String,Object>> definedTags)
Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example:
{"Operations": {"CostCenter": "42"}}
definedTags
- the value to setpublic AlarmSummary.Builder lifecycleState(Alarm.LifecycleState lifecycleState)
The current lifecycle state of the alarm.
Example: DELETED
lifecycleState
- the value to setpublic AlarmSummary.Builder overrides(List<AlarmOverride> overrides)
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
).
overrides
- the value to setpublic AlarmSummary.Builder ruleName(String ruleName)
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
.
ruleName
- the value to setpublic AlarmSummary.Builder notificationVersion(String notificationVersion)
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.
notificationVersion
- the value to setpublic AlarmSummary.Builder notificationTitle(String notificationTitle)
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.
notificationTitle
- the value to setpublic AlarmSummary.Builder evaluationSlackDuration(String evaluationSlackDuration)
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.
evaluationSlackDuration
- the value to setpublic AlarmSummary.Builder alarmSummary(String alarmSummary)
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
and retrieveDimensionStates
.
alarmSummary
- the value to setpublic AlarmSummary.Builder resourceGroup(String resourceGroup)
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
resourceGroup
- the value to setpublic AlarmSummary build()
public AlarmSummary.Builder copy(AlarmSummary model)
Copyright © 2016–2024. All rights reserved.