MonitoringUptimeCheckConfig
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 |
Config Connector Default Average Reconcile Interval In Seconds | 600 |
Custom Resource Definition Properties
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 | |
---|---|
Optional |
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. |
Optional |
|
Required* |
|
Optional |
Possible values: CONTENT_MATCHER_OPTION_UNSPECIFIED, CONTAINS_STRING, NOT_CONTAINS_STRING, MATCHES_REGEX, NOT_MATCHES_REGEX |
Required |
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. |
Optional |
Contains information needed to make an HTTP or HTTPS check. |
Optional |
The authentication information. Optional when creating an HTTP check; defaults to empty. |
Required* |
|
Optional |
Value of the field. Cannot be used if 'valueFrom' is specified. |
Optional |
Source for the field's value. Cannot be used if 'value' is specified. |
Optional |
Reference to a value with the given key in the given Secret in the resource's namespace. |
Required* |
Key that identifies the value to be extracted. |
Required* |
Name of the Secret to extract a value from. |
Required* |
|
Optional |
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=". |
Optional |
Immutable. The content type to use for the check. Possible values: TYPE_UNSPECIFIED, URL_ENCODED |
Optional |
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. |
Optional |
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 `******.` |
Optional |
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. |
Optional |
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. |
Optional |
Immutable. The HTTP request method to use for the check. If set to `METHOD_UNSPECIFIED` then `request_method` defaults to `GET`. |
Optional |
If `true`, use HTTPS instead of HTTP to run the check. |
Optional |
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. |
Optional |
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` |
Required* |
Immutable. |
Required* |
Immutable. |
Optional |
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`. |
Required |
Immutable. The Project that this resource belongs to. |
Optional |
The project for this uptime check config. Allowed value: The Google Cloud resource name of a `Project` resource (format: `projects/{{name}}`). |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
Immutable. The group resource associated with the configuration. |
Optional |
Immutable. |
Optional |
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}}`). |
Optional |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
Optional |
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ |
Optional |
Immutable. The resource type of the group members. Possible values: RESOURCE_TYPE_UNSPECIFIED, INSTANCE, AWS_ELB_LOAD_BALANCER |
Optional |
Immutable. Optional. The service-generated name of the resource. Used for acquisition only. Leave unset to create a new resource. |
Optional |
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. |
Optional |
|
Optional |
Contains information needed to make a TCP check. |
Required* |
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. |
Required |
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 |
Conditions represent the latest available observation of the resource's current state. |
conditions[] |
|
conditions[].lastTransitionTime |
Last time the condition transitioned from one status to another. |
conditions[].message |
Human-readable message indicating details about last transition. |
conditions[].reason |
Unique, one-word, CamelCase reason for the condition's last transition. |
conditions[].status |
Status is the status of the condition. Can be True, False, Unknown. |
conditions[].type |
Type is the type of the condition. |
observedGeneration |
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"