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)
  ],
  "isInternal": boolean,
  "internalCheckers": [
    {
      object(InternalChecker)
    }
  ],

  // 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 Workspace in order to make it easier to identify; however, uniqueness is not enforced. Required.

period

string (Duration format)

How often, in seconds, the uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 300s.

timeout

string (Duration format)

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

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.

isInternal

boolean

Denotes whether this is a check that egresses from InternalCheckers.

internalCheckers[]

object(InternalChecker)

The internal checkers that this check will egress from. If isInternal is true and this list is empty, the check will egress from all InternalCheckers configured for the project that owns this CheckConfig.

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. The following monitored resource types are supported for uptime checks: uptime_url gce_instance gae_app aws_ec2_instance aws_elb_load_balancer

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. For a list of types, see Monitoring resource types and Logging resource types.

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. INSTANCE includes gce_instance and aws_ec2_instance resource types. The resource types gae_app and uptime_url are not valid here 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 from Google Cloud Platform (GCP) or Amazon Web Services (AWS).
AWS_ELB_LOAD_BALANCER A group of Amazon ELB 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. The maximum number of headers allowed is 100.

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. It allows substring and regular expressions, together with their negations.

JSON representation
{
  "content": string
}
Fields
content

string

String or regex content to match (max 1024 bytes)

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).

InternalChecker

Nimbus InternalCheckers. The API currently only allows reading of internal checkers, creation of internal checkers is a manual process.

JSON representation
{
  "name": string,
  "displayName": string,
  "network": string,
  "gcpZone": string
}
Fields
name

string

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

projects/[PROJECT_ID]/internalCheckers/[CHECKER_ID].

PROJECT_ID is the GCP project ID where the internal resource lives. Not necessarily the same as the project_id for the config.

displayName

string

The checker's human-readable name. The display name should be unique within a Stackdriver Workspace in order to make it easier to identify; however, uniqueness is not enforced.

network

string

The GCP VPC network where the internal resource lives (ex: "default").

gcpZone

string

The GCP zone the uptime check should egress from. Only respected for internal uptime checks, where internal_network is specified.

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.
Was this page helpful? Let us know how we did:

Send feedback about...

Stackdriver Monitoring