File: //snap/google-cloud-cli/current/help/man/man1/gcloud_beta_monitoring_uptime_create.1
.TH "GCLOUD_BETA_MONITORING_UPTIME_CREATE" 1
.SH "NAME"
.HP
gcloud beta monitoring uptime create \- create a new uptime check or synthetic monitor
.SH "SYNOPSIS"
.HP
\f5gcloud beta monitoring uptime create\fR \fIDISPLAY_NAME\fR (\fB\-\-synthetic\-target\fR=\fISYNTHETIC_TARGET\fR\ |\ [\fB\-\-group\-id\fR=\fIGROUP_ID\fR\ :\ \fB\-\-group\-type\fR=\fIGROUP_TYPE\fR]\ |\ [\fB\-\-resource\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]\ :\ \fB\-\-resource\-type\fR=\fIRESOURCE_TYPE\fR]) [\fB\-\-body\fR=\fIBODY\fR\ \fB\-\-content\-type\fR=\fICONTENT_TYPE\fR\ \fB\-\-custom\-content\-type\fR=\fICUSTOM_CONTENT_TYPE\fR\ \fB\-\-headers\fR=[\fIKEY\fR=\fIVALUE\fR,...]\ \fB\-\-mask\-headers\fR=\fIMASK_HEADERS\fR\ \fB\-\-password\fR=\fIPASSWORD\fR\ \fB\-\-path\fR=\fIPATH\fR\ \fB\-\-pings\-count\fR=\fIPINGS_COUNT\fR\ \fB\-\-port\fR=\fIPORT\fR\ \fB\-\-protocol\fR=\fIPROTOCOL\fR\ \fB\-\-request\-method\fR=\fIREQUEST_METHOD\fR\ \fB\-\-service\-agent\-auth\fR=\fISERVICE_AGENT_AUTH\fR\ \fB\-\-username\fR=\fIUSERNAME\fR\ \fB\-\-validate\-ssl\fR=\fIVALIDATE_SSL\fR\ \fB\-\-status\-classes\fR=[\fIstatus\-class\fR,...]\ |\ \fB\-\-status\-codes\fR=[\fIstatus\-code\fR,...]] [\fB\-\-matcher\-content\fR=\fIMATCHER_CONTENT\fR\ :\ \fB\-\-matcher\-type\fR=\fIMATCHER_TYPE\fR\ [\fB\-\-json\-path\fR=\fIJSON_PATH\fR\ :\ \fB\-\-json\-path\-matcher\-type\fR=\fIJSON_PATH_MATCHER_TYPE\fR]] [\fB\-\-period\fR=\fIPERIOD\fR\ \fB\-\-regions\fR=[\fIfield\fR,...]\ \fB\-\-timeout\fR=\fITIMEOUT\fR\ \fB\-\-user\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(BETA)\fR Create a new uptime check or synthetic monitor.
Flags only apply to uptime checks unless noted that they apply to synthetic
monitors.
For information about the JSON/YAML format of an uptime check:
https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.uptimeCheckConfigs
.SH "EXAMPLES"
To create an uptime check against a URL, run:
.RS 2m
$ gcloud beta monitoring uptime create DISPLAY_NAME \e
\-\-resource\-type=uptime\-url \e
\-\-resource\-labels=host=google.com,project_id=PROJECT_ID
.RE
To create a synthetic monitor, run:
.RS 2m
$ gcloud beta monitoring uptime create SYNTHETIC_MONITOR_NAME \e
\-\-synthetic\-target=projects/PROJECT_ID/locations/REGION/\e
functions/FUNCTION_NAME
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fIDISPLAY_NAME\fR
Display name for the uptime check or synthetic monitor.
.RE
.sp
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
Uptime check resource.
Exactly one of these must be specified:
.RS 2m
.TP 2m
\fB\-\-synthetic\-target\fR=\fISYNTHETIC_TARGET\fR
The target of the Synthetic Monitor. This is the fully qualified GCFv2 resource
name.
.TP 2m
Monitored resource group
.RS 2m
.TP 2m
\fB\-\-group\-id\fR=\fIGROUP_ID\fR
The group of resources being monitored.
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-group\-type\fR=\fIGROUP_TYPE\fR
The resource type of the group members, defaults to \f5gce\-instance\fR.
\fIGROUP_TYPE\fR must be one of:
.RS 2m
.TP 2m
\fBaws\-elb\-load\-balancer\fR
Uptime check against a group of Amazon ELB load balancers.
.TP 2m
\fBgce\-instance\fR
Uptime check against a group of instances from Google Cloud or Amazon Web
Services.
.RE
.sp
.RE
.sp
.TP 2m
Monitored resource
.RS 2m
.TP 2m
\fB\-\-resource\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]
Values for all of the labels listed in the associated monitored resource
descriptor. See https://cloud.google.com/monitoring/api/resources for more
information and allowed keys.
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-resource\-type\fR=\fIRESOURCE_TYPE\fR
Type of monitored resource, defaults to \f5uptime\-url\fR. \fIRESOURCE_TYPE\fR
must be one of:
.RS 2m
.TP 2m
\fBaws\-ec2\-instance\fR
Uptime check against an AWS EC2 instance.
.TP 2m
\fBaws\-elb\-load\-balancer\fR
Uptime check against an ElasticLoadBalancer.
.TP 2m
\fBcloud\-run\-revision\fR
Uptime check against a Cloud Run revision.
.TP 2m
\fBgae\-app\fR
Uptime check against an App Engine module.
.TP 2m
\fBgce\-instance\fR
Uptime check against a Compute Engine instance.
.TP 2m
\fBservicedirectory\-service\fR
Uptime check against a Service Directory service.
.TP 2m
\fBuptime\-url\fR
Uptime check against a URL.
.RE
.sp
.RE
.RE
.RE
.sp
.SH "OPTIONAL FLAGS"
.RS 2m
.TP 2m
Uptime check protocol settings.
.RS 2m
.TP 2m
\fB\-\-body\fR=\fIBODY\fR
The request body associated with the HTTP POST request. Can only be set if
\f5\-\-protocol\fR is \f5http\fR or \f5https\fR.
.TP 2m
\fB\-\-content\-type\fR=\fICONTENT_TYPE\fR
The content type header to use for the check, defaults to \f5unspecified\fR. Can
only be set if \f5\-\-protocol\fR is \f5http\fR or \f5https\fR.
\fICONTENT_TYPE\fR must be one of:
.RS 2m
.TP 2m
\fBunspecified\fR
Not specified
.TP 2m
\fBurl\-encoded\fR
URL encoded
.TP 2m
\fBuser\-provided\fR
User provided
.RE
.sp
.TP 2m
\fB\-\-custom\-content\-type\fR=\fICUSTOM_CONTENT_TYPE\fR
A user\-provided content type header to use for the check. Can only be set if
\f5\-\-protocol\fR is \f5http\fR or \f5https\fR.
.TP 2m
\fB\-\-headers\fR=[\fIKEY\fR=\fIVALUE\fR,...]
The list of headers to send as part of the uptime check request. Can only be set
if \f5\-\-protocol\fR is \f5http\fR or \f5https\fR.
.TP 2m
\fB\-\-mask\-headers\fR=\fIMASK_HEADERS\fR
Whether to encrypt the header information, defaults to \f5false\fR. Can only be
set if \f5\-\-protocol\fR is \f5http\fR or \f5https\fR.
.TP 2m
\fB\-\-password\fR=\fIPASSWORD\fR
The password to use when authenticating with the HTTP server. Can only be set if
\f5\-\-protocol\fR is \f5http\fR or \f5https\fR.
.TP 2m
\fB\-\-path\fR=\fIPATH\fR
The path to the page against which to run the check, defaults to \f5/\fR. Can
only be set if \f5\-\-protocol\fR is \f5http\fR or \f5https\fR.
.TP 2m
\fB\-\-pings\-count\fR=\fIPINGS_COUNT\fR
Number of ICMP pings to send alongside the request.
.TP 2m
\fB\-\-port\fR=\fIPORT\fR
The port on the server against which to run the check. Defaults to \f580\fR when
\f5\-\-protocol\fR is \f5http\fR. Defaults to \f5443\fR when \f5\-\-protocol\fR
is \f5https\fR. Required if \f5\-\-protocol\fR is \f5tcp\fR.
.TP 2m
\fB\-\-protocol\fR=\fIPROTOCOL\fR
The protocol of the request, defaults to \f5http\fR. \fIPROTOCOL\fR must be one
of:
.RS 2m
.TP 2m
\fBhttp\fR
An HTTP check.
.TP 2m
\fBhttps\fR
An HTTPS check.
.TP 2m
\fBtcp\fR
A TCP check.
.RE
.sp
.TP 2m
\fB\-\-request\-method\fR=\fIREQUEST_METHOD\fR
The HTTP request method to use, defaults to \f5get\fR. Can only be set if
\f5\-\-protocol\fR is \f5http\fR or \f5https\fR.
\fIREQUEST_METHOD\fR must be one of:
.RS 2m
.TP 2m
\fBget\fR
HTTP GET method
.TP 2m
\fBpost\fR
HTTP POST method
.RE
.sp
.TP 2m
Uptime check service agent authorization.
.RS 2m
.TP 2m
\fB\-\-service\-agent\-auth\fR=\fISERVICE_AGENT_AUTH\fR
The type of authentication to use for the HTTP request. Can only be set if
\f5\-\-protocol\fR is \f5https\fR.
\fISERVICE_AGENT_AUTH\fR must be (only one value is supported):
.RS 2m
.TP 2m
\fBoidc\-token\fR
OIDC Token authentication
.RE
.sp
.RE
.sp
.TP 2m
\fB\-\-username\fR=\fIUSERNAME\fR
The username to use when authenticating with the HTTP server. Can only be set if
\f5\-\-protocol\fR is \f5http\fR or \f5https\fR.
.TP 2m
\fB\-\-validate\-ssl\fR=\fIVALIDATE_SSL\fR
Whether to include SSL certificate validation as a part of the uptime check,
defaults to \f5false\fR. Can only be set if \f5\-\-protocol\fR is \f5http\fR or
\f5https\fR.
.TP 2m
Uptime check status.
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-status\-classes\fR=[\fIstatus\-class\fR,...]
List of HTTP status classes. The uptime check only passes when the response code
is contained in this list. Defaults to \f52xx\fR. Can only be set if
\f5\-\-protocol\fR is \f5http\fR or \f5https\fR.
\fIstatus\-class\fR must be one of:
.RS 2m
.TP 2m
\fB1xx\fR
Any response code from 100\-199 inclusive
.TP 2m
\fB2xx\fR
Any response code from 200\-299 inclusive
.TP 2m
\fB3xx\fR
Any response code from 300\-399 inclusive
.TP 2m
\fB4xx\fR
Any response code from 400\-499 inclusive
.TP 2m
\fB5xx\fR
Any response code from 500\-599 inclusive
.TP 2m
\fBany\fR
Any response code
.RE
.sp
.TP 2m
\fB\-\-status\-codes\fR=[\fIstatus\-code\fR,...]
List of HTTP Status Codes. The uptime check will only pass if the response code
is present in this list. Can only be set if \f5\-\-protocol\fR is \f5http\fR or
\f5https\fR.
.RE
.RE
.sp
.TP 2m
Uptime check matcher settings.
.RS 2m
.TP 2m
\fB\-\-matcher\-content\fR=\fIMATCHER_CONTENT\fR
String, regex or JSON content to match.
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-matcher\-type\fR=\fIMATCHER_TYPE\fR
The type of content matcher that is applied to the server output, defaults to
\f5contains\-string\fR.
\fIMATCHER_TYPE\fR must be one of:
.RS 2m
.TP 2m
\fBcontains\-string\fR
Response contains string
.TP 2m
\fBmatches\-json\-path\fR
Response matches at JSONPath
.TP 2m
\fBmatches\-regex\fR
Response matches regex
.TP 2m
\fBnot\-contains\-string\fR
Response does not contain string
.TP 2m
\fBnot\-matches\-json\-path\fR
Response does not match at JSONPath
.TP 2m
\fBnot\-matches\-regex\fR
Response does not match regex
.RE
.sp
.TP 2m
Uptime check matcher settings for JSON responses.
.RS 2m
.TP 2m
\fB\-\-json\-path\fR=\fIJSON_PATH\fR
JSONPath within the response output pointing to the expected content to match.
Only used if \f5\-\-matcher\-type\fR is \f5matches\-json\-path\fR or
\f5not\-matches\-json\-path\fR.
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-json\-path\-matcher\-type\fR=\fIJSON_PATH_MATCHER_TYPE\fR
The type of JSONPath match that is applied to the JSON output, defaults to
\f5exact\-match\fR. Only used if \f5\-\-matcher\-type\fR is
\f5matches\-json\-path\fR or \f5not\-matches\-json\-path\fR.
\fIJSON_PATH_MATCHER_TYPE\fR must be one of:
.RS 2m
.TP 2m
\fBexact\-match\fR
Response matches exact string at JSONPath
.TP 2m
\fBregex\-match\fR
Response matches regex at JSONPath
.RE
.sp
.RE
.RE
.sp
.TP 2m
Settings.
.RS 2m
.TP 2m
\fB\-\-period\fR=\fIPERIOD\fR
The time between uptime check or synthetic monitor executions in minutes,
defaults to \f51\fR. Can be set for synthetic monitors.
\fIPERIOD\fR must be one of:
.RS 2m
.TP 2m
\fB1\fR
One minute
.TP 2m
\fB10\fR
Ten minutes
.TP 2m
\fB15\fR
Fifteen minutes
.TP 2m
\fB5\fR
Five minutes
.RE
.sp
.TP 2m
\fB\-\-regions\fR=[\fIfield\fR,...]
The list of regions from which the check is run. At least 3 regions must be
selected. Defaults to all available regions.
\fIfield\fR must be one of:
.RS 2m
.TP 2m
\fBasia\-pacific\fR
asia\-southeast1
.TP 2m
\fBeurope\fR
europe\-west1
.TP 2m
\fBsouth\-america\fR
southamerica\-east1
.TP 2m
\fBusa\-iowa\fR
us\-central1
.TP 2m
\fBusa\-oregon\fR
us\-west1
.TP 2m
\fBusa\-virginia\fR
us\-east4
.RE
.sp
.TP 2m
\fB\-\-timeout\fR=\fITIMEOUT\fR
The maximum amount of time in seconds to wait for the request to complete,
defaults to \f560\fR. Can be set for synthetic monitors.
.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.
.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 beta and might change without notice. These
variants are also available:
.RS 2m
$ gcloud monitoring uptime create
.RE
.RS 2m
$ gcloud alpha monitoring uptime create
.RE