monitoring library
Cloud Monitoring: alert policies, notification channels, uptime probes, dashboards, custom metric descriptors, and SLO service objects.
Classes
- Aggregation
-
One entry in an
aggregations/denominator_aggregationslist. Multiple Aggregations are applied in order. - AlertCondition
-
One entry in
google_monitoring_alert_policy.conditions. Carries a human-readable displayName plus EXACTLY one of the 6 condition-type sub-blocks. Terraform enforces the exactly_one_of contract at apply time; the Dart shape leaves all 6 sub-fields nullable to keep the class count manageable. - AlertStrategy
-
alert_strategyblock (max=1) — controls notification cadence, auto-close timing, and notification prompts. - ConditionAbsent
-
condition_absentblock — fires when a time series stops receiving data points for duration. Currently only multiples of a minute are accepted by the API for duration. - ConditionMatchedLog
-
condition_matched_logblock — fires on log entries matching filter. If set, no other conditions can be present in the parent AlertCondition (the alert policy must use anotification_rate_limitin AlertStrategy when this condition type is used). - ConditionMonitoringQueryLanguage
-
condition_monitoring_query_languageblock — MQL-driven condition. query must produce a boolean stream. - ConditionPrometheusQueryLanguage
-
condition_prometheus_query_languageblock — PromQL-driven condition. duration is optional (default 0) but represents how long the PromQL expression must evaluate to true before the alert fires. - ConditionSql
-
condition_sqlblock — Log Analytics SQL-driven condition. Pick exactly one of minutes / hourly / daily for the schedule, and exactly one of booleanTest / rowCountTest for the alerting rule (Terraform enforces both exactly_one_of contracts). - ConditionThreshold
-
condition_thresholdblock — compares a time series against a fixed threshold (or a numerator/denominator ratio when denominatorFilter is set).forecastOptionsflips the semantics to "predict whether the timeseries will violate within forecastHorizon". - ConditionTrigger
-
triggersub-block — number / percentage of time series that must fail the predicate for the condition to fire. Both fields are optional; if neither is set, any single failing time series triggers the condition. - Documentation
-
documentationblock (max=1) — notification-side context: content body, subject line, and optional playbook / runbook links. - DocumentationLink
-
documentation.linksentry — a labeled URL surfaced in notifications. Up to 3 link entries per policy. - ForecastOptions
-
condition_threshold.forecast_options(max=1). - GoogleMonitoringAlertPolicy
-
Factory wrapper for
google_monitoring_alert_policy(providerhashicorp/google ~> 7.0). - GoogleMonitoringDashboard
-
Factory wrapper for
google_monitoring_dashboard(providerhashicorp/google ~> 7.0). - GoogleMonitoringMetricDescriptor
-
Factory wrapper for
google_monitoring_metric_descriptor(providerhashicorp/google ~> 7.0). - GoogleMonitoringNotificationChannel
-
Factory wrapper for
google_monitoring_notification_channel(providerhashicorp/google ~> 7.0). - GoogleMonitoringService
-
Factory wrapper for
google_monitoring_service(providerhashicorp/google ~> 7.0). - GoogleMonitoringUptimeCheckConfig
-
Factory wrapper for
google_monitoring_uptime_check_config(providerhashicorp/google ~> 7.0). - MonitoringMetricDescriptorLabel
-
One entry in
labels— describes a label key that values of this metric carry. The label-level valueType is narrower than the descriptor's top-level MonitoringValueType (noDOUBLE/DISTRIBUTION). - MonitoringMetricDescriptorMetadata
-
metadatablock (max=1) — sampling / ingest-delay hints for the metric. Both fields are Duration-format strings (e.g.'60s','300s'). - MonitoringNotificationChannelSensitiveLabels
-
sensitive_labelsblock (max=1) — credential slots for notification channel types that need an out-of-band secret. Each transport uses a different subset: - MonitoringServiceBasicService
-
basic_serviceblock (max=1) — a well-known service type defined by its serviceType (e.g.'APP_ENGINE','CLOUD_ENDPOINTS','CLUSTER_ISTIO','MESH_ISTIO') and a set of serviceLabels that pin the variant to a specific service instance. See the SLO monitoring docs for the valid(serviceType, serviceLabels)combinations. - MonitoringServiceTelemetry
-
Read-only view of the server-populated
telemetryblock. Cloud Monitoring derives resourceName from the chosen service-type variant; consumers may read it via GoogleMonitoringService.telemetry. - MonitoringUptimeCheckAcceptedResponseStatus
-
http_check.accepted_response_status_codes[]entry. Either statusClass (a code range bucket) or statusValue (a literal status code) should be set per entry. When the list is empty, the API accepts the default 200-299 range. - MonitoringUptimeCheckCloudFunctionV2
-
synthetic_monitor.cloud_function_v2block (min=1, max=1) — target Cloud Functions V2 instance that implements the probe logic. - MonitoringUptimeCheckContentMatcher
-
One entry in
google_monitoring_uptime_check_config.content_matchers. - MonitoringUptimeCheckHttpAuthInfo
-
http_check.auth_infoblock (max=1) — Basic-auth username/password pair.passwordis schema-flagged sensitive and is automatically masked on synth (seeextraSensitiveFieldsin this resource's wrapper override). Do not use alongside MonitoringUptimeCheckServiceAgentAuthentication. - MonitoringUptimeCheckHttpCheck
-
http_checkblock (max=1). Mutually exclusive withtcpCheckandsyntheticMonitoron the parent resource — the Terraform provider enforces theexactly_one_ofcontract at apply time. - MonitoringUptimeCheckJsonPathMatcher
-
content_matchers[].json_path_matcherblock (max=1). Used by theMATCHES_JSON_PATH/NOT_MATCHES_JSON_PATHparent matchers. - MonitoringUptimeCheckMonitoredResource
-
monitored_resourceblock (max=1). Directly target a single monitored resource (e.g. anuptime_urlagainst a public hostname, or agce_instance). Mutually exclusive with MonitoringUptimeCheckResourceGroup. - MonitoringUptimeCheckPingConfig
-
http_check.ping_config/tcp_check.ping_configblock (max=1) — configures ICMP pings emitted alongside the main probe (max 3 pings). - MonitoringUptimeCheckResourceGroup
-
resource_groupblock (max=1). Target every member of a Cloud Monitoring group resource. Mutually exclusive with MonitoringUptimeCheckMonitoredResource. - MonitoringUptimeCheckServiceAgentAuthentication
-
http_check.service_agent_authenticationblock (max=1) — emit an OIDC token signed by the Monitoring service agent on the probe request. Mutually exclusive with MonitoringUptimeCheckHttpAuthInfo. - MonitoringUptimeCheckSyntheticMonitor
-
synthetic_monitorblock (max=1). Mutually exclusive withhttpCheckandtcpCheckon the parent resource. - MonitoringUptimeCheckTcpCheck
-
tcp_checkblock (max=1). Mutually exclusive withhttpCheckandsyntheticMonitoron the parent resource. - NotificationChannelStrategy
-
alert_strategy.notification_channel_strategy(list) — per-channel notification controls. Each entry pairs a subset of the alert's notification channels with a renotifyInterval cadence. - NotificationRateLimit
-
alert_strategy.notification_rate_limit(max=1). period is a Duration string (e.g.'300s'). Required when the parent policy uses a ConditionMatchedLog condition. - SqlBooleanTest
-
condition_sql.boolean_test— the SQL query returns a boolean column; rows where column istrueare treated as violations. - SqlExecutionTime
-
condition_sql.daily.execution_time(max=1) — wall-clock time of day (UTC) for the daily run. - SqlRowCountTest
-
condition_sql.row_count_test— fires when the result row count satisfiescount [comparison] threshold. - SqlScheduleDaily
-
condition_sql.dailyschedule. - SqlScheduleHourly
-
condition_sql.hourlyschedule. - SqlScheduleMinutes
-
condition_sql.minutesschedule.
Enums
- AlertCombiner
-
Combiner for
google_monitoring_alert_policy.combiner— how the conditions list reduces to a single incident-open decision. - AlertSeverity
-
Severity for
google_monitoring_alert_policy.severity. Surfaces on the Incident detail page and in notifications. - Aligner
-
Per-series alignment function for
aggregations.per_series_aligner. - Comparison
-
Comparison operator for
condition_threshold.comparisonandcondition_sql.row_count_test.comparison. - EvaluationMissingData
- Behavior when a threshold / MQL condition stops receiving data.
- MonitoringMetricKind
-
metric_kind— whether the metric records instantaneous values, deltas, or running totals. Not every(metricKind, valueType)combination is supported by the Cloud Monitoring API. - MonitoringMetricLabelValueType
-
labels[].value_type— the data type of a label attached to this metric. The label-level value space is narrower than the descriptor's (noDOUBLE/DISTRIBUTION). Defaults to MonitoringMetricLabelValueType.string when omitted. - MonitoringMetricLaunchStage
-
launch_stage— release-management stage of this metric definition. Defaults to MonitoringMetricLaunchStage.ga / unset for stable metrics. - MonitoringUptimeCheckCheckerType
-
Checker pool selector for
google_monitoring_uptime_check_config.checker_type. - MonitoringUptimeCheckContentType
-
Content-type for
http_check.content_type(the standardContent-Typeheader sent on probe requests). - MonitoringUptimeCheckHttpMethod
-
HTTP method for
http_check.request_method. - MonitoringUptimeCheckJsonMatcher
-
JSONPath match mode for
content_matchers[].json_path_matcher.json_matcher. Defaults to exactMatch on the GCP API. - MonitoringUptimeCheckMatcher
-
Match mode for
content_matchers[].matcher. Defaults to containsString on the GCP API. - MonitoringUptimeCheckRegion
-
Region selector for
google_monitoring_uptime_check_config.selected_regions. - MonitoringUptimeCheckResourceType
-
Member-resource type for
resource_group.resource_type. - MonitoringUptimeCheckServiceAgentAuthType
-
Service Agent authentication mode for
http_check.service_agent_authentication.type. - MonitoringUptimeCheckStatusClass
-
HTTP status class for
http_check.accepted_response_status_codes[].status_class. - MonitoringValueType
-
value_type— the value kind recorded per data point. Use MonitoringValueType.distribution together with the histogram-bucket configuration on the metric's time series; the schema does not includeMONEYor aVALUE_TYPE_UNSPECIFIEDsentinel. - NotificationPrompt
-
Notification prompt for
alert_strategy.notification_prompts— controls when notifications fire across the incident lifecycle. - Reducer
-
Cross-series reducer for
aggregations.cross_series_reducer.