Show / Hide Table of Contents

Class CustomMetric

Metric details for triggering an autoscaling action based on a custom MQL query.

Inheritance
object
MetricBase
CustomMetric
Inherited Members
MetricBase.PendingDuration
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Oci.AutoscalingService.Models
Assembly: OCI.DotNetSDK.Autoscaling.dll
Syntax
public class CustomMetric : MetricBase

Properties

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 metrics.

Remarks

Required

Namespace

Declaration
[Required(ErrorMessage = "Namespace is required.")]
[JsonProperty(PropertyName = "namespace")]
public string Namespace { get; set; }
Property Value
Type Description
string

The namespace for the query.

Remarks

Required

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: 1m-60m (also 1h). You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy().
Example of threshold alarm:


CpuUtilization[1m]{availabilityDomain=\"cumS:PHX-AD-1\"}.groupBy(availabilityDomain).percentile(0.9) > 85
-----
Remarks

Required

ResourceGroup

Declaration
[JsonProperty(PropertyName = "resourceGroup")]
public string ResourceGroup { get; set; }
Property Value
Type Description
string

The resource group for the query.

In this article
Back to top