Skip to main content

Alarm

An alarm is a condition that triggers a notification. It is defined by a metric, a comparison operator, a threshold, and a period.

type Alarm {
id: ID!
cloudResourceId: String!
displayName: String!
namespace: String
name: String
statistic: String
dimensions: [Dimension]!
comparisonOperator: String
threshold: Float
period: Int
currentState: PackageAlarmState
}

Fields

Alarm.id ● ID! non-null scalar

Unique identifier for the alarm.

Alarm.cloudResourceId ● String! non-null scalar

The cloud provider's unique identifier for this alarm. Examples: AWS: 'arn:aws:cloudwatch:us-west-2:123456789012:alarm:test-alarm', Azure: '/subscriptions/.../alerts/12345678-1234-1234-1234-1234567890ab'

Alarm.displayName ● String! non-null scalar

Human-readable name for the alarm.

Alarm.namespace ● String scalar

The cloud provider's metric namespace that categorizes the metric. Examples: AWS: 'AWS/EC2', 'AWS/RDS', Azure: 'Microsoft.Storage/storageAccounts', GCP: 'cloudsql_database'

Alarm.name ● String scalar

The specific metric being monitored. Examples: AWS: 'CPUUtilization', 'ApproximateNumberOfMessagesVisible', Azure: 'Transactions', 'allpercentprocessortime', GCP: 'cloudsql.googleapis.com/database/cpu/utilization'

Alarm.statistic ● String scalar

The statistical function applied to the metric data. Examples: AWS: 'Average', 'Sum', 'Maximum', Azure: 'Average', 'Total', 'Maximum', GCP: (typically not used)

Alarm.dimensions ● [Dimension]! non-null object

Key-value pairs that identify the specific resource being monitored. Examples: AWS: [{'name': 'InstanceId', 'value': 'i-1234567890abcdef0'}], Azure: [{'name': 'ApiName', 'value': 'GetBlob'}]

Alarm.comparisonOperator ● String scalar

The operator used to compare the metric value against the threshold. Examples: GREATER_THAN, LESS_THAN

Alarm.threshold ● Float scalar

The value that triggers the alarm when crossed by the metric value. The comparison is made using the comparison_operator.

Alarm.period ● Int scalar

The time window in seconds over which the metric is evaluated.

Alarm.currentState ● PackageAlarmState object

The most recent state of the alarm. If no states exist, returns INSUFFICIENT_DATA. Otherwise, returns the most recent state based on occurred_at timestamp.

Returned By

packageAlarms subscription

Member Of

Package object