REST Resource: projects.uptimeCheckConfigs

Resource: UptimeCheckConfig

This message configures which resources and services to monitor for availability.

JSON representation
{
  "name": string,
  "displayName": string,
  "period": string,
  "timeout": string,
  "contentMatchers": [
    {
      object(ContentMatcher)
    }
  ],
  "selectedRegions": [
    enum(UptimeCheckRegion)
  ],

  // Union field resource can be only one of the following:
  "monitoredResource": {
    object(MonitoredResource)
  },
  "resourceGroup": {
    object(ResourceGroup)
  },
  // End of list of possible types for union field resource.

  // Union field check_request_type can be only one of the following:
  "httpCheck": {
    object(HttpCheck)
  },
  "tcpCheck": {
    object(TcpCheck)
  },
  // End of list of possible types for union field check_request_type.
}
Fields
name

string

A unique resource name for this UptimeCheckConfig. The format is:

projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].

This field should be omitted when creating the uptime check configuration; on create, the resource name is assigned by the server and included in the response.

displayName

string

A human-friendly name for the uptime check configuration. The display name should be unique within a Stackdriver Account in order to make it easier to identify; however, uniqueness is not enforced. Required.

period

string (Duration format)

How often the uptime check is performed. Currently, only 1, 5, 10, and 15 minutes are supported. Required.

A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

timeout

string (Duration format)

The maximum amount of time to wait for the request to complete (must be between 1 and 60 seconds). Required.

A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

contentMatchers[]

object(ContentMatcher)

The expected content on the page the check is run against. Currently, only the first entry in the list is supported, and other entries will be ignored. The server will look for an exact match of the string in the page response's content. This field is optional and should only be specified if a content match is required.

selectedRegions[]

enum(UptimeCheckRegion)

The list of regions from which the check will be run. If this field is specified, enough regions to include a minimum of 3 locations must be provided, or an error message is returned. Not specifying this field will result in uptime checks running from all regions.

Union field resource. The resource the check is checking. Required. resource can be only one of the following:
monitoredResource

object(MonitoredResource)

The monitored resource associated with the configuration.

resourceGroup

object(ResourceGroup)

The group resource associated with the configuration.

Union field check_request_type. The type of uptime check request. check_request_type can be only one of the following:
httpCheck

object(HttpCheck)

Contains information needed to make an HTTP or HTTPS check.

tcpCheck

object(TcpCheck)

Contains information needed to make a TCP check.

MonitoredResource

An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "zone":

{ "type": "gce_instance",
  "labels": { "instance_id": "12345678901234",
              "zone": "us-central1-a" }}
JSON representation
{
  "type": string,
  "labels": {
    string: string,
    ...
  },
}
Fields
type

string

Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance.

labels

map (key: string, value: string)

Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone".

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

ResourceGroup

The resource submessage for group checks. It can be used instead of a monitored resource, when multiple resources are being monitored.

JSON representation
{
  "groupId": string,
  "resourceType": enum(GroupResourceType),
}
Fields
groupId

string

The group of resources being monitored. Should be only the groupId, not projects//groups/.

resourceType

enum(GroupResourceType)

The resource type of the group members.

GroupResourceType

The supported resource types that can be used as values of group_resource.resource_type. gae_app and uptime_url are not allowed because group checks on App Engine modules and URLs are not allowed.

Enums
RESOURCE_TYPE_UNSPECIFIED Default value (not valid).
INSTANCE A group of instances (could be either GCE or AWS_EC2).
AWS_ELB_LOAD_BALANCER A group of AWS load balancers.

HttpCheck

Information involved in an HTTP/HTTPS uptime check request.

JSON representation
{
  "useSsl": boolean,
  "path": string,
  "port": number,
  "authInfo": {
    object(BasicAuthentication)
  },
  "maskHeaders": boolean,
  "headers": {
    string: string,
    ...
  },
}
Fields
useSsl

boolean

If true, use HTTPS instead of HTTP to run the check.

path

string

The path to the page to run the check against. Will be combined with the host (specified within the MonitoredResource) and port to construct the full URL. Optional (defaults to "/").

port

number

The port to the page to run the check against. Will be combined with host (specified within the MonitoredResource) and path to construct the full URL. Optional (defaults to 80 without SSL, or 443 with SSL).

authInfo

object(BasicAuthentication)

The authentication information. Optional when creating an HTTP check; defaults to empty.

maskHeaders

boolean

Boolean specifiying whether to encrypt the header information. Encryption should be specified for any headers related to authentication that you do not wish to be seen when retrieving the configuration. The server will be responsible for encrypting the headers. On Get/List calls, if maskHeaders is set to True then the headers will be obscured with ******.

headers

map (key: string, value: string)

The list of headers to send as part of the uptime check request. If two headers have the same key and different values, they should be entered as a single header, with the value being a comma-separated list of all the desired values as described at https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). Entering two separate headers with the same key in a Create call will cause the first to be overwritten by the second.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

BasicAuthentication

A type of authentication to perform against the specified resource or URL that uses username and password. Currently, only Basic authentication is supported in Uptime Monitoring.

JSON representation
{
  "username": string,
  "password": string,
}
Fields
username

string

The username to authenticate.

password

string

The password to authenticate.

TcpCheck

Information required for a TCP uptime check request.

JSON representation
{
  "port": number,
}
Fields
port

number

The port to the page to run the check against. Will be combined with host (specified within the MonitoredResource) to construct the full URL. Required.

ContentMatcher

Used to perform string matching. Currently, this matches on the exact content. In the future, it can be expanded to allow for regular expressions and more complex matching.

JSON representation
{
  "content": string,
}
Fields
content

string

String content to match

UptimeCheckRegion

The regions from which an uptime check can be run.

Enums
REGION_UNSPECIFIED Default value if no region is specified. Will result in uptime checks running from all regions.
USA Allows checks to run from locations within the United States of America.
EUROPE Allows checks to run from locations within the continent of Europe.
SOUTH_AMERICA Allows checks to run from locations within the continent of South America.
ASIA_PACIFIC Allows checks to run from locations within the Asia Pacific area (ex: Singapore).

Methods

create

Creates a new uptime check configuration.

delete

Deletes an uptime check configuration.

get

Gets a single uptime check configuration.

list

Lists the existing valid uptime check configurations for the project, leaving out any invalid configurations.

patch

Updates an uptime check configuration.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Stackdriver Monitoring