KRM API monitoring.gdc.goog/v1

monitoring.gdc.goog/v1

Contains API Schema definitions for the Monitoring group.

AlertRule

Defines the alert rules configuration.

Appears in: - MonitoringRuleSpec

Field Description
alert string The alert name. Its value must be a valid label value.
expr string The PromQL or LogQL expression to evaluate the alert rule.
for string The duration in seconds over which the specified condition must be met to move the alert from the pending state to the open state.
labels object (keys:string, values:string) The labels to add or overwrite. The required labels in this field are severity: [error, critical, warning, info], code: <short code for the error>, and resource: <component, service, or hardware related to the alert>. Any additional labels are optional.
annotations object (keys:string, values:string) The annotations to add.

ClusterStatus

ClusterStatus is a list of conditions affecting a specific cluster.

Appears in: - MonitoringTargetStatus

Field Description
cluster string
conditions Condition array

MonitoringRule

Defines the Schema for the Monitoring Rules API.

Appears in: - MonitoringRuleList

Field Description
apiVersion string monitoring.gdc.goog/v1
kind string MonitoringRule
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec MonitoringRuleSpec
status MonitoringRuleStatus

MonitoringRuleList

Contains a list of monitoring rules.

Field Description
apiVersion string monitoring.gdc.goog/v1
kind string MonitoringRuleList
metadata ListMeta Refer to Kubernetes API documentation for fields of metadata.
items MonitoringRule array

MonitoringRuleSpec

Defines the specification or expected state of the MonitoringRule object.

Appears in: - MonitoringRule

Field Description
interval string The rule evaluation interval.
limit integer The limit number of alerts. A value of 0 means no limit.
recordRules RecordRule array The list of record rules.
alertRules AlertRule array The list of alert rules.

MonitoringRuleStatus

Defines the observed state of the MonitoringRule object.

Appears in: - MonitoringRule

Field Description
conditions Condition array Defines the observed state of the MonitoringRule object.

MonitoringTarget

Defines the Schema for the monitoring targets API.

Appears in: - MonitoringTargetList

Field Description
apiVersion string monitoring.gdc.goog/v1
kind string MonitoringTarget
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec MonitoringTargetSpec
status MonitoringTargetStatus

MonitoringTargetList

Contains a list of monitoring targets.

Field Description
apiVersion string monitoring.gdc.goog/v1
kind string MonitoringTargetList
metadata ListMeta Refer to Kubernetes API documentation for fields of metadata.
items MonitoringTarget array

MonitoringTargetMetricsRelabeling

Defines a filter for keeping or discarding metrics based on labels.

Appears in: - MonitoringTargetPodMetricsEndpoints

Field Description
sourceLabels string array The selected values from existing labels. The content is concatenated using the separator and matched against the regex expression for the replace, keep, and drop actions.
separator string The separator value placed between concatenated source label values.
regex string The regular expression to match the extracted value.
action string The action to perform when the regex expression matches the extracted value.
targetLabel string The label to which to write the resulting value in a replace action. This field is mandatory for replace actions. Capture groups of regular expressions are available.
replacement string The replacement value to use if the regular expression matches the extracted value in a replace action. Capture groups of regular expressions are available.

MonitoringTargetPodMetricsEndpoints

Configures the metric endpoints for scraped pods.

Appears in: - MonitoringTargetSpec

Field Description
port MonitoringTargetPodMetricsPort The port from which metrics are scraped.
path MonitoringTargetPodMetricsPath The path from which metrics are scraped.
scheme MonitoringTargetPodMetricsScheme The scheme to use when scraping metrics.
params object (keys:string, values:string array) The query parameters to use when scraping metrics from the path.
scrapeInterval string The frequency for Prometheus to scrape the metric endpoints defined in the podMetricsEndpoints field.
scrapeTimeout string The time for Prometheus to wait for the response from the metric endpoints defined in the podMetricsEndpoints field.
metricsRelabelings MonitoringTargetMetricsRelabeling array The filter for either including (allowlist) or excluding (denylist) metrics based on labels.

MonitoringTargetPodMetricsPath

Determines the path to use for scraping metrics from pods.

Appears in: - MonitoringTargetPodMetricsEndpoints

Field Description
value string The path to collect metrics from. If annotations are provided, they take priority over this field.
annotation string The path to collect metrics from using annotations.

MonitoringTargetPodMetricsPort

Determines the port to use for scraping metrics from pods.

Appears in: - MonitoringTargetPodMetricsEndpoints

Field Description
value integer The port to collect metrics from. If annotations are provided, they take priority over this field.
annotation string The port to collect metrics from using annotations.

MonitoringTargetPodMetricsScheme

Determines the scheme to use for scraping metrics from pods.

Appears in: - MonitoringTargetPodMetricsEndpoints

Field Description
value string The scheme to use when collecting metrics. If annotations are provided, they take priority over this field.
annotation string The scheme to use when collecting metrics using annotations.

MonitoringTargetSelectors

Provides selectors that determine which pods to monitor.

Appears in: - MonitoringTargetSpec

Field Description
matchClusters string array The clusters to consider for this job. The default configuration is to consider all the clusters applicable to the project. The relationship between different clusters is an OR relationship. For example, the value ["admin", "system"] indicates to consider the admin cluster OR the system cluster.
matchLabels object (keys:string, values:string) The pod labels to consider for this job. The default configuration is to consider no filter based on labels. The relationship between different pairs is an AND relationship, so all pairs are considered.
matchAnnotations object (keys:string, values:string) The annotations to consider for this job. The default configuration is to consider no filter based on annotations. The relationship between different pairs is an AND relationship, so all pairs are considered.

MonitoringTargetSpec

Defines the specification or expected state of the MonitoringTarget object.

Appears in: - MonitoringTarget

Field Description
selector MonitoringTargetSelectors The matching pattern that identifies pods for this job. To establish a relationship between different selectors, use AND.
podMetricsEndpoints MonitoringTargetPodMetricsEndpoints The endpoint exposed for this job. The endpoint uses the style of Prometheus.

MonitoringTargetStatus

Defines the observed state of the MonitoringTarget object.

Appears in: - MonitoringTarget

Field Description
conditions Condition array A list of conditions observed in the monitoring stack.
clusterStatuses ClusterStatus array ClusterStatuses is a list of each cluster and the conditions observed in the Monitoring stack for that cluster.

RecordRule

Defines the record rules configuration.

Appears in: - MonitoringRuleSpec

Field Description
record string The time series in which to write the record rule. It must be a valid metric name.
expr string The PromQL or LogQL expression to evaluate the record rule.
labels object (keys:string, values:string) The labels to add or overwrite.