gcloud monitoring policies migrate Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud monitoring policies migrate - migrate a Prometheus configuration file to Cloud Monitoring
- SYNOPSIS
gcloud monitoring policies migrate[--channels-from-prometheus-alertmanager-yaml=PROMETHEUS_ALERT_MANAGER_FILE_PATH--policies-from-prometheus-alert-rules-yaml=[PROMETHEUS_ALERT_RULE_FILE_PATHS,…]][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
- Creates new alerting policies and/or notification channels based on providedPrometheus files. The rules YAML file, which holds the alert rules, must bespecified as a file through the
--policies-from-prometheus-alert-rules-yamlflag. - FLAGS
--channels-from-prometheus-alertmanager-yaml=PROMETHEUS_ALERT_MANAGER_FILE_PATH- Prometheus alert manager YAML file to be converted to Cloud Monitoringnotification channels. Specifying this flag with the--policies-from-prometheus-alert-rules-yaml flag puts the newly creatednotification channels into the translated Alert Policies' definition. Use a fullor relative path to a local file containing the value ofchannels_from_prometheus_alertmanager_yaml.
--policies-from-prometheus-alert-rules-yaml=[PROMETHEUS_ALERT_RULE_FILE_PATHS,…]- One or more Prometheus alert rule YAML files (separated by commas if multiple)to be converted to Cloud Alerting Policies. Example:--policies-from-prometheus-alert-rules-yaml=rules_1.yaml,rules_2.yaml
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - NOTES
- These variants are also available:
gcloudalphamonitoringpoliciesmigrategcloudbetamonitoringpoliciesmigrate
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-09 UTC.