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_aggregations list. 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_strategy block (max=1) — controls notification cadence, auto-close timing, and notification prompts.
ConditionAbsent
condition_absent block — 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_log block — fires on log entries matching filter. If set, no other conditions can be present in the parent AlertCondition (the alert policy must use a notification_rate_limit in AlertStrategy when this condition type is used).
ConditionMonitoringQueryLanguage
condition_monitoring_query_language block — MQL-driven condition. query must produce a boolean stream.
ConditionPrometheusQueryLanguage
condition_prometheus_query_language block — 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_sql block — 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_threshold block — compares a time series against a fixed threshold (or a numerator/denominator ratio when denominatorFilter is set). forecastOptions flips the semantics to "predict whether the timeseries will violate within forecastHorizon".
ConditionTrigger
trigger sub-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
documentation block (max=1) — notification-side context: content body, subject line, and optional playbook / runbook links.
documentation.links entry — 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 (provider hashicorp/google ~> 7.0).
GoogleMonitoringDashboard
Factory wrapper for google_monitoring_dashboard (provider hashicorp/google ~> 7.0).
GoogleMonitoringMetricDescriptor
Factory wrapper for google_monitoring_metric_descriptor (provider hashicorp/google ~> 7.0).
GoogleMonitoringNotificationChannel
Factory wrapper for google_monitoring_notification_channel (provider hashicorp/google ~> 7.0).
GoogleMonitoringService
Factory wrapper for google_monitoring_service (provider hashicorp/google ~> 7.0).
GoogleMonitoringUptimeCheckConfig
Factory wrapper for google_monitoring_uptime_check_config (provider hashicorp/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 (no DOUBLE / DISTRIBUTION).
MonitoringMetricDescriptorMetadata
metadata block (max=1) — sampling / ingest-delay hints for the metric. Both fields are Duration-format strings (e.g. '60s', '300s').
MonitoringNotificationChannelSensitiveLabels
sensitive_labels block (max=1) — credential slots for notification channel types that need an out-of-band secret. Each transport uses a different subset:
MonitoringServiceBasicService
basic_service block (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 telemetry block. 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_v2 block (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_info block (max=1) — Basic-auth username/password pair. password is schema-flagged sensitive and is automatically masked on synth (see extraSensitiveFields in this resource's wrapper override). Do not use alongside MonitoringUptimeCheckServiceAgentAuthentication.
MonitoringUptimeCheckHttpCheck
http_check block (max=1). Mutually exclusive with tcpCheck and syntheticMonitor on the parent resource — the Terraform provider enforces the exactly_one_of contract at apply time.
MonitoringUptimeCheckJsonPathMatcher
content_matchers[].json_path_matcher block (max=1). Used by the MATCHES_JSON_PATH / NOT_MATCHES_JSON_PATH parent matchers.
MonitoringUptimeCheckMonitoredResource
monitored_resource block (max=1). Directly target a single monitored resource (e.g. an uptime_url against a public hostname, or a gce_instance). Mutually exclusive with MonitoringUptimeCheckResourceGroup.
MonitoringUptimeCheckPingConfig
http_check.ping_config / tcp_check.ping_config block (max=1) — configures ICMP pings emitted alongside the main probe (max 3 pings).
MonitoringUptimeCheckResourceGroup
resource_group block (max=1). Target every member of a Cloud Monitoring group resource. Mutually exclusive with MonitoringUptimeCheckMonitoredResource.
MonitoringUptimeCheckServiceAgentAuthentication
http_check.service_agent_authentication block (max=1) — emit an OIDC token signed by the Monitoring service agent on the probe request. Mutually exclusive with MonitoringUptimeCheckHttpAuthInfo.
MonitoringUptimeCheckSyntheticMonitor
synthetic_monitor block (max=1). Mutually exclusive with httpCheck and tcpCheck on the parent resource.
MonitoringUptimeCheckTcpCheck
tcp_check block (max=1). Mutually exclusive with httpCheck and syntheticMonitor on 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 is true are 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 satisfies count [comparison] threshold.
SqlScheduleDaily
condition_sql.daily schedule.
SqlScheduleHourly
condition_sql.hourly schedule.
SqlScheduleMinutes
condition_sql.minutes schedule.

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.comparison and condition_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 (no DOUBLE / 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 standard Content-Type header 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 include MONEY or a VALUE_TYPE_UNSPECIFIED sentinel.
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.