create_alert_policy
Create GCP alert policies to monitor metric thresholds and send notifications when conditions are met.
Instructions
Create a new alert policy in a GCP project.
Args:
project_id: The ID of the GCP project
display_name: The display name for the alert policy
metric_type: The metric type to monitor (e.g., "compute.googleapis.com/instance/cpu/utilization")
filter_str: The filter for the metric data
duration_seconds: The duration in seconds over which to evaluate the condition (default: 60)
threshold_value: The threshold value for the condition (default: 0.0)
comparison: The comparison type (COMPARISON_GT, COMPARISON_LT, etc.) (default: COMPARISON_GT)
notification_channels: Optional list of notification channel IDs
Returns:
Result of the alert policy creation
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comparison | No | COMPARISON_GT | |
| filter_str | Yes | ||
| project_id | Yes | ||
| metric_type | Yes | ||
| display_name | Yes | ||
| threshold_value | No | ||
| duration_seconds | No | ||
| notification_channels | No |