MonitoringUptimeCheckConfig

Stay organized with collections Save and categorize content based on your preferences.
Property Value
Google Cloud Service Name Cloud Monitoring
Google Cloud Service Documentation /monitoring/docs/
Google Cloud REST Resource Name v3.projects.uptimeCheckConfigs
Google Cloud REST Resource Documentation /monitoring/api/ref_v3/rest/v3/projects.uptimeCheckConfigs
Config Connector Resource Short Names gcpmonitoringuptimecheckconfig
gcpmonitoringuptimecheckconfigs
monitoringuptimecheckconfig
Config Connector Service Name monitoring.googleapis.com
Config Connector Resource Fully Qualified Name monitoringuptimecheckconfigs.monitoring.cnrm.cloud.google.com
Can Be Referenced by IAMPolicy/IAMPolicyMember No

Custom Resource Definition Properties

Annotations

Fields
cnrm.cloud.google.com/state-into-spec

Spec

Schema

contentMatchers:
- content: string
  matcher: string
displayName: string
httpCheck:
  authInfo:
    password:
      value: string
      valueFrom:
        secretKeyRef:
          key: string
          name: string
    username: string
  body: string
  contentType: string
  headers:
    string: string
  maskHeaders: boolean
  path: string
  port: integer
  requestMethod: string
  useSsl: boolean
  validateSsl: boolean
monitoredResource:
  filterLabels:
    string: string
  type: string
period: string
projectRef:
  external: string
  name: string
  namespace: string
resourceGroup:
  groupRef:
    external: string
    name: string
    namespace: string
  resourceType: string
resourceID: string
selectedRegions:
- string
tcpCheck:
  port: integer
timeout: string
Fields

contentMatchers

Optional

list (object)

The content that is expected to appear in the data returned by the target server against which the check is run. Currently, only the first entry in the `content_matchers` list is supported, and additional entries will be ignored. This field is optional and should only be specified if a content match is required as part of the/ Uptime check.

contentMatchers[]

Optional

object

contentMatchers[].content

Required*

string

contentMatchers[].matcher

Optional

string

Possible values: CONTENT_MATCHER_OPTION_UNSPECIFIED, CONTAINS_STRING, NOT_CONTAINS_STRING, MATCHES_REGEX, NOT_MATCHES_REGEX

displayName

Required

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.

httpCheck

Optional

object

Contains information needed to make an HTTP or HTTPS check.

httpCheck.authInfo

Optional

object

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

httpCheck.authInfo.password

Required*

object

httpCheck.authInfo.password.value

Optional

string

Value of the field. Cannot be used if 'valueFrom' is specified.

httpCheck.authInfo.password.valueFrom

Optional

object

Source for the field's value. Cannot be used if 'value' is specified.

httpCheck.authInfo.password.valueFrom.secretKeyRef

Optional

object

Reference to a value with the given key in the given Secret in the resource's namespace.

httpCheck.authInfo.password.valueFrom.secretKeyRef.key

Required*

string

Key that identifies the value to be extracted.

httpCheck.authInfo.password.valueFrom.secretKeyRef.name

Required*

string

Name of the Secret to extract a value from.

httpCheck.authInfo.username

Required*

string

httpCheck.body

Optional

string

The request body associated with the HTTP POST request. If `content_type` is `URL_ENCODED`, the body passed in must be URL-encoded. Users can provide a `Content-Length` header via the `headers` field or the API will do so. If the `request_method` is `GET` and `body` is not empty, the API will return an error. The maximum byte size is 1 megabyte. Note: As with all `bytes` fields JSON representations are base64 encoded. e.g.: "foo=bar" in URL-encoded form is "foo%3Dbar" and in base64 encoding is "Zm9vJTI1M0RiYXI=".

httpCheck.contentType

Optional

string

Immutable. The content type to use for the check. Possible values: TYPE_UNSPECIFIED, URL_ENCODED

httpCheck.headers

Optional

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.

httpCheck.maskHeaders

Optional

boolean

Immutable. Boolean specifying 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 `mask_headers` is set to `true` then the headers will be obscured with `******.`

httpCheck.path

Optional

string

Optional (defaults to "/"). The path to the page against which to run the check. Will be combined with the `host` (specified within the `monitored_resource`) and `port` to construct the full URL. If the provided path does not begin with "/", a "/" will be prepended automatically.

httpCheck.port

Optional

integer

Optional (defaults to 80 when `use_ssl` is `false`, and 443 when `use_ssl` is `true`). The TCP port on the HTTP server against which to run the check. Will be combined with host (specified within the `monitored_resource`) and `path` to construct the full URL.

httpCheck.requestMethod

Optional

string

Immutable. The HTTP request method to use for the check. If set to `METHOD_UNSPECIFIED` then `request_method` defaults to `GET`.

httpCheck.useSsl

Optional

boolean

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

httpCheck.validateSsl

Optional

boolean

Boolean specifying whether to include SSL certificate validation as a part of the Uptime check. Only applies to checks where `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, setting `validate_ssl` to `true` has no effect.

monitoredResource

Optional

object

Immutable. The [monitored resource](https://cloud.google.com/monitoring/api/resources) 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`

monitoredResource.filterLabels

Required*

map (key: string, value: string)

Immutable.

monitoredResource.type

Required*

string

Immutable.

period

Optional

string

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 `60s`.

projectRef

Required

object

Immutable. The Project that this resource belongs to.

projectRef.external

Optional

string

The project for this uptime check config. Allowed value: The Google Cloud resource name of a `Project` resource (format: `projects/{{name}}`).

projectRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

projectRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

resourceGroup

Optional

object

Immutable. The group resource associated with the configuration.

resourceGroup.groupRef

Optional

object

Immutable.

resourceGroup.groupRef.external

Optional

string

The group of resources being monitored. Should be only the `[GROUP_ID]`, and not the full-path `projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]`. Allowed value: The Google Cloud resource name of a `MonitoringGroup` resource (format: `projects/{{project}}/groups/{{name}}`).

resourceGroup.groupRef.name

Optional

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

resourceGroup.groupRef.namespace

Optional

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

resourceGroup.resourceType

Optional

string

Immutable. The resource type of the group members. Possible values: RESOURCE_TYPE_UNSPECIFIED, INSTANCE, AWS_ELB_LOAD_BALANCER

resourceID

Optional

string

Immutable. Optional. The service-generated name of the resource. Used for acquisition only. Leave unset to create a new resource.

selectedRegions

Optional

list (string)

The list of regions from which the check will be run. Some regions contain one location, and others contain more than one. If this field is specified, enough regions must be provided to include a minimum of 3 locations. Not specifying this field will result in Uptime checks running from all available regions.

selectedRegions[]

Optional

string

tcpCheck

Optional

object

Contains information needed to make a TCP check.

tcpCheck.port

Required*

integer

The TCP port on the server against which to run the check. Will be combined with host (specified within the `monitored_resource`) to construct the full URL. Required.

timeout

Required

string

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

* Field is required when parent field is specified

Status

Schema

conditions:
- lastTransitionTime: string
  message: string
  reason: string
  status: string
  type: string
observedGeneration: integer
Fields
conditions

list (object)

Conditions represent the latest available observation of the resource's current state.

conditions[]

object

conditions[].lastTransitionTime

string

Last time the condition transitioned from one status to another.

conditions[].message

string

Human-readable message indicating details about last transition.

conditions[].reason

string

Unique, one-word, CamelCase reason for the condition's last transition.

conditions[].status

string

Status is the status of the condition. Can be True, False, Unknown.

conditions[].type

string

Type is the type of the condition.

observedGeneration

integer

ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource.

Sample YAML(s)

Http Uptime Check Config

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: monitoring.cnrm.cloud.google.com/v1beta1
kind: MonitoringUptimeCheckConfig
metadata:
  name: monitoringuptimecheckconfig-sample
spec:
  projectRef:
    # Replace ${PROJECT_ID?} with your project ID.
    external: projects/${PROJECT_ID?}
  displayName: "A sample http uptime check config"
  period: 60s
  timeout: 30s
  contentMatchers:
    - content: ".*"
      matcher: "MATCHES_REGEX"
  selectedRegions:
    - USA
  monitoredResource:
    type: "uptime_url"
    filterLabels:
      host: "192.168.1.1"
      # Replace ${PROJECT_ID?} with the ID of a monitored project.
      project_id: ${PROJECT_ID?}
  httpCheck:
    requestMethod: POST
    useSsl: true
    path: "/main"
    port: 80
    authInfo:
      username: test
      password:
        valueFrom:
          secretKeyRef:
            name: monitoringuptimecheckconfig-dep
            key: password
    maskHeaders: true
    headers:
      header-one: "value-one"
    contentType: "URL_ENCODED"
    validateSsl: false
    body: "c3RyaW5nCg=="
---
apiVersion: v1
kind: Secret
metadata:
  name: monitoringuptimecheckconfig-dep
data:
  password: cGFzc3dvcmQ=

Tcp Uptime Check Config

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: monitoring.cnrm.cloud.google.com/v1beta1
kind: MonitoringUptimeCheckConfig
metadata:
  name: monitoringuptimecheckconfig-sample
spec:
  projectRef:
    # Replace ${PROJECT_ID?} with your project ID.
    external: projects/${PROJECT_ID?}
  displayName: "A sample TCP uptime check config"
  timeout: 30s
  resourceGroup:
    groupRef:
      name: monitoringuptimecheckconfig-dep
    resourceType: INSTANCE
  tcpCheck:
    port: 80
---
apiVersion: monitoring.cnrm.cloud.google.com/v1beta1
kind: MonitoringGroup
metadata:
  name: monitoringuptimecheckconfig-dep
spec:
  projectRef:
    # Replace ${PROJECT_ID?} with your project ID.
    external: projects/${PROJECT_ID?}
  filter: resource.metadata.region=europe-west2
  displayName: "A sample monitoring group"