## logging.gdc.goog/v1

Contains API Schema definitions for the Logging
group.

### AlertRule

Defines the alert rules configuration.

*Appears in:*
- [LoggingRuleSpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingrulespec)

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

### LoggingRule

Defines the Schema for the Logging Rules API.

*Appears in:*
- [LoggingRuleList](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingrulelist)

| Field | Description |
|---|---|
| `apiVersion` *string* | `logging.gdc.goog/v1` |
| `kind` *string* | `LoggingRule` |
| `metadata` *[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#objectmeta-v1-meta)* | Refer to Kubernetes API documentation for fields of `metadata`. |
| `spec` *[LoggingRuleSpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingrulespec)* |   |
| `status` *[LoggingRuleStatus](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingrulestatus)* |   |

### LoggingRuleList

Contains a list of logging rules.

| Field | Description |
|---|---|
| `apiVersion` *string* | `logging.gdc.goog/v1` |
| `kind` *string* | `LoggingRuleList` |
| `metadata` *[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#listmeta-v1-meta)* | Refer to Kubernetes API documentation for fields of `metadata`. |
| `items` *[LoggingRule](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingrule) array* |   |

### LoggingRuleSpec

Defines the specification or expected state of the `LoggingRule` object.

*Appears in:*
- [LoggingRule](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingrule)

| Field | Description |
|---|---|
| `source` *Source* | The log source on which to base alerts. Accepted values are `operational` and `audit`. |
| `interval` *string* | The rule evaluation interval. |
| `limit` *integer* | The limit number of alerts. A value of `0` means no limit. |
| `recordRules` *[RecordRule](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#recordrule) array* | The list of record rules. |
| `alertRules` *[AlertRule](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#alertrule) array* | The list of alert rules. |

### LoggingRuleStatus

Defines the observed state of the `LoggingRule` object.

*Appears in:*
- [LoggingRule](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingrule)

| Field | Description |
|---|---|
| `conditions` *[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#condition-v1-meta) array* | A list of conditions observed in the logging alerting stack. |
| `lokiInstance` *string* | The name of the Loki host instance where the `LoggingRule` object is currently installed. |

### LoggingTarget

Defines the Schema for the operational logging targets API.

*Appears in:*
- [LoggingTargetList](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingtargetlist)

| Field | Description |
|---|---|
| `apiVersion` *string* | `logging.gdc.goog/v1` |
| `kind` *string* | `LoggingTarget` |
| `metadata` *[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#objectmeta-v1-meta)* | Refer to Kubernetes API documentation for fields of `metadata`. |
| `spec` *[LoggingTargetSpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingtargetspec)* |   |
| `status` *[LoggingTargetStatus](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingtargetstatus)* |   |

### LoggingTargetList

Contains a list of logging targets.

| Field | Description |
|---|---|
| `apiVersion` *string* | `logging.gdc.goog/v1` |
| `kind` *string* | `LoggingTargetList` |
| `metadata` *[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#listmeta-v1-meta)* | Refer to Kubernetes API documentation for fields of `metadata`. |
| `items` *[LoggingTarget](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingtarget) array* |   |

### LoggingTargetSelectors

Provides selectors that determine which pods or containers to collect logs from.

*Appears in:*
- [LoggingTargetSpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingtargetspec)

| Field | Description |
|---|---|
| `matchClusters` *string array* | The clusters to collect logs from. The default configuration is to collect logs from all clusters. 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. |
| `matchPodNames` *string array* | The pod name prefixes to collect logs from. The Observability platform scrapes all pods with names that start with the specified prefixes. The values must contain `[a-z0-9-]` characters only. The relationship between different list elements is an `OR` relationship. |
| `matchContainerNames` *string array* | The container name prefixes to collect logs from. The Observability platform scrapes all containers with names that start with the specified prefixes. The values must contain `[a-z0-9-]` characters only. The relationship between different list elements is an `OR` relationship. |

### LoggingTargetSpec

Defines the specification or expected state of the `LoggingTarget` object.

*Appears in:*
- [LoggingTarget](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingtarget)

| Field | Description |
|---|---|
| `selector` *[LoggingTargetSelectors](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingtargetselectors)* | The matching pattern that identifies pods or containers to collect logs from. The relationship between different selectors is an `AND` relationship, so all selectors are considered. |
| `logAccessLevel` *LogAccessLevel* | The access level for log entries. The default value is `AO` for Application Operator. |
| `parser` *OperationalLogParser* | The predefined parser for log entries. |
| `serviceName` *string* | A service name to apply as a label. For user workloads, you can consider this field for a workload name. |
| `additionalFields` *object (keys:string, values:string)* | The additional static fields to apply to log entries. This field is a mapping of key-value pairs, where the field name is the key and the field value is the value. |

### LoggingTargetStatus

Defines the observed state of the `LoggingTarget` object.

*Appears in:*
- [LoggingTarget](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingtarget)

| Field | Description |
|---|---|
| `conditions` *[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#condition-v1-meta) array* | A list of conditions observed in the logging stack. |

### RecordRule

Defines the record rules configuration.

*Appears in:*
- [LoggingRuleSpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#loggingrulespec)

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

### SIEMOrgForwarder

Defines the Schema for the `SIEMOrgForwarder` API.
This API defines the type of logs, which can be audit or operational, and the external SIEM destination to send the logs.

*Appears in:*
- [SIEMOrgForwarderList](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#siemorgforwarderlist)

| Field | Description |
|---|---|
| `apiVersion` *string* | `logging.gdc.goog/v1` |
| `kind` *string* | `SIEMOrgForwarder` |
| `metadata` *[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#objectmeta-v1-meta)* | Refer to Kubernetes API documentation for fields of `metadata`. |
| `spec` *[SIEMOrgForwarderSpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#siemorgforwarderspec)* |   |
| `status` *[SIEMOrgForwarderStatus](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#siemorgforwarderstatus)* |   |

### SIEMOrgForwarderList

Contains a list of `SIEMOrgForwarder` objects.

| Field | Description |
|---|---|
| `apiVersion` *string* | `logging.gdc.goog/v1` |
| `kind` *string* | `SIEMOrgForwarderList` |
| `metadata` *[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#listmeta-v1-meta)* | Refer to Kubernetes API documentation for fields of `metadata`. |
| `items` *[SIEMOrgForwarder](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#siemorgforwarder) array* |   |

### SIEMOrgForwarderSpec

Defines the specification or expected state of the `SIEMOrgForwarder` resource.

*Appears in:*
- [SIEMOrgForwarder](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#siemorgforwarder)

| Field | Description |
|---|---|
| `source` *LogType* | The type of logs to export to a SIEM destination. Accepted values are `operational` and `audit`. |
| `splunkOutputs` *[SplunkOutput](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#splunkoutput) array* | The list of Splunk outputs. |

### SIEMOrgForwarderStatus

Defines the observed state of the `SIEMOrgForwarder` resource.

*Appears in:*
- [SIEMOrgForwarder](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#siemorgforwarder)

| Field | Description |
|---|---|
| `conditions` *[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#condition-v1-meta) array* | The observed state of the `SIEMOrgForwarder` resource. |

### SplunkOutput

Defines the Splunk output configuration.

*Appears in:*
- [SIEMOrgForwarderSpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#siemorgforwarderspec)

| Field | Description |
|---|---|
| `host` *string* | The host name of the target Splunk service. |
| `token` *[Token](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#token)* | The authentication token for the HTTP Event Collector interface. |
| `tls` *string* | The Transport Layer Security (TLS) protocol. For more information, see https://docs.fluentbit.io/manual/administration/transport-security. |
| `netConnectTimeout` *integer* | The maximum time in seconds to wait for a TCP connection to be established. This value includes the TLS handshake time. |

### Token

Defines the token configuration for the SIEM export.

*Appears in:*
- [SplunkOutput](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/logging/v1/logging-v1#splunkoutput)

| Field | Description |
|---|---|
| `name` *string* | The name of the token. |
| `field` *string* | The field of the token. |