HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/396/help/man/man1/gcloud_alpha_monitoring_policies_create.1
.TH "GCLOUD_ALPHA_MONITORING_POLICIES_CREATE" 1



.SH "NAME"
.HP
gcloud alpha monitoring policies create \- create a new alerting policy



.SH "SYNOPSIS"
.HP
\f5gcloud alpha monitoring policies create\fR [\fB\-\-notification\-channels\fR=[\fINOTIFICATION_CHANNELS\fR,...]] [\fB\-\-aggregation\fR=\fIAGGREGATION\fR\ \fB\-\-condition\-display\-name\fR=\fICONDITION_DISPLAY_NAME\fR\ \fB\-\-condition\-filter\fR=\fICONDITION_FILTER\fR\ \fB\-\-duration\fR=\fIDURATION\fR\ \fB\-\-if\fR=\fIIF_VALUE\fR\ \fB\-\-trigger\-count\fR=\fITRIGGER_COUNT\fR\ |\ \fB\-\-trigger\-percent\fR=\fITRIGGER_PERCENT\fR] [\fB\-\-combiner\fR=\fICOMBINER\fR\ \fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR\ \fB\-\-no\-enabled\fR\ \fB\-\-user\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]\ \fB\-\-documentation\-format\fR=\fIDOCUMENTATION_FORMAT\fR;\ default="text/markdown"\ \fB\-\-documentation\fR=\fIDOCUMENTATION\fR\ |\ \fB\-\-documentation\-from\-file\fR=\fIPATH_TO_FILE\fR] [\fB\-\-policy\fR=\fIPOLICY\fR\ |\ \fB\-\-policy\-from\-file\fR=\fIPATH_TO_FILE\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

\fB(ALPHA)\fR Creates a new alerting policy. An alert policy can be specified as
a JSON/YAML value passed in as a string through the \f5\-\-policy\fR flag or as
a file through the \f5\-\-policy\-from\-file\fR flag. A basic policy can also be
specified through command line flags. If a policy is specified through
\f5\-\-policy\fR or \f5\-\-policy\-from\-file\fR, and additional flags are
supplied, the flags will override the policy's settings and a specified
condition will be appended to the list of conditions.

For information about the JSON/YAML format of an alerting policy:
https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alertPolicies



.SH "FLAGS"

.RS 2m
.TP 2m

Notification Channel resource \- Names of one or more Notification Channels to
be added to the policy. These should be the resource names (not the display
name) of the channels. Acceptable formats are:

.RS 2m
.IP "\(em" 2m
Channel Name: \f5my\-channel\fR
.RS 2m
.IP "\(bu" 2m
The project specified through \f5\-\-project\fR or the default project defined
by the \f5core/project\fR property will be used, in that order.
.RE
.sp
.IP "\(em" 2m
Channel Relative Name:
\f5projects/my\-project/notificationChannels/channel\-id0\fR
.IP "\(em" 2m
Channel URI:
https://monitoring.googleapis.com/v3/projects/my\-project/notificationChannels/channel\-id0
This represents a Cloud resource. (NOTE) Some attributes are not given arguments
in this group but can be set in other ways.
.RE
.sp

To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-notification\-channels\fR on the command line with a
fully specified name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp


.RS 2m
.TP 2m
\fB\-\-notification\-channels\fR=[\fINOTIFICATION_CHANNELS\fR,...]

IDs of the Notification Channels or fully qualified identifiers for the
Notification Channels.

To set the \f5notification_channels\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-notification\-channels\fR on the command line.
.RE
.sp

.RE
.sp
.TP 2m

Condition Settings. This will add a condition to the created policy. If any
conditions are already specified, this condition will be appended.


.RS 2m
.TP 2m
\fB\-\-aggregation\fR=\fIAGGREGATION\fR

Specifies an Aggregation message as a JSON/YAML value to be applied to the
condition. For more information about the format:
https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alertPolicies

.TP 2m
\fB\-\-condition\-display\-name\fR=\fICONDITION_DISPLAY_NAME\fR

The display name for the condition.

.TP 2m
\fB\-\-condition\-filter\fR=\fICONDITION_FILTER\fR

Specifies the "filter" in a metric absence or metric threshold condition.

.TP 2m
\fB\-\-duration\fR=\fIDURATION\fR

The duration (e.g. "60s", "2min", etc.) that the condition must hold in order to
trigger as true.

.TP 2m
\fB\-\-if\fR=\fIIF_VALUE\fR

One of "absent", "< THRESHOLD", "> THRESHOLD" where "THRESHOLD" is an integer or
float.

.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-trigger\-count\fR=\fITRIGGER_COUNT\fR

The absolute number of time series that must fail the predicate for the
condition to be triggered.

.TP 2m
\fB\-\-trigger\-percent\fR=\fITRIGGER_PERCENT\fR

The percentage of time series that must fail the predicate for the condition to
be triggered.

.RE
.RE
.sp
.TP 2m

Policy Settings. If any of these are specified, they will overwrite fields in
the \f5\-\-policy\fR or \f5\-\-policy\-from\-file\fR flags if specified.


.RS 2m
.TP 2m
\fB\-\-combiner\fR=\fICOMBINER\fR

The combiner for the Alert Policy. \fICOMBINER\fR must be one of:

.RS 2m
.TP 2m
\fBAND\fR
An incident is created only if all conditions are met simultaneously. This
combiner is satisfied if all conditions are met, even if they are met on
completely different resources.
.TP 2m
\fBAND_WITH_MATCHING_RESOURCE\fR
Combine conditions using logical AND operator, but unlike the regular AND
option, an incident is created only if all conditions are met simultaneously on
at least one resource.
.TP 2m
\fBCOMBINE_UNSPECIFIED\fR
An unspecified combiner
.TP 2m
\fBOR\fR
An incident is created if any of the listed conditions is met.
.RE
.sp


.TP 2m
\fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR

The display name for the Alert Policy.

.TP 2m
\fB\-\-enabled\fR

If the policy is enabled. Enabled by default, use \fB\-\-no\-enabled\fR to
disable.

.TP 2m
\fB\-\-user\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]

List of label KEY=VALUE pairs to add.

Keys must start with a lowercase character and contain only hyphens (\f5\-\fR),
underscores (\f5_\fR), lowercase characters, and numbers. Values must contain
only hyphens (\f5\-\fR), underscores (\f5_\fR), lowercase characters, and
numbers.

If the policy was given as a JSON/YAML object from a string or file, this flag
will replace the labels value in the given policy.

.TP 2m

Documentation


.RS 2m
.TP 2m
\fB\-\-documentation\-format\fR=\fIDOCUMENTATION_FORMAT\fR; default="text/markdown"

The MIME type that should be used with \f5\-\-documentation\fR or
\f5\-\-documentation\-from\-file\fR. Currently, only "text/markdown" is
supported.

.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-documentation\fR=\fIDOCUMENTATION\fR

The documentation to be included with the policy.

.TP 2m
\fB\-\-documentation\-from\-file\fR=\fIPATH_TO_FILE\fR

The path to a file containing the documentation to be included with the policy.
Use a full or relative path to a local file containing the value of
documentation.

.RE
.RE
.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-policy\fR=\fIPOLICY\fR

The policy as a string. In either JSON or YAML format.

.TP 2m
\fB\-\-policy\-from\-file\fR=\fIPATH_TO_FILE\fR

The path to a JSON or YAML file containing the policy. Use a full or relative
path to a local file containing the value of policy.


.RE
.RE
.sp

.SH "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 \fB$ gcloud help\fR for details.



.SH "NOTES"

This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation\-only early access
allowlist.