## 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/gdcag/apis/service/logging/v1/logging-v1.md.txt#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, high, moderate, low]`, `code: <short code for the error>`, and `resource: <component, service,`errorcode: _gdch_project: \` |
| `annotations` *object (keys:string, values:string)* | The annotations to add. |

### ApiServerEntry

*Appears in:*
- [AuditlogInventorySpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#auditloginventoryspec)

| Field | Description |
|---|---|
| `resourceKind` *string* |   |
| `auditRelevant` *boolean* |   |
| `comment` *string* |   |
| `resourceName` *string* |   |
| `namespace` *string* |   |
| `users` *string array* |   |
| `filters` *[Filter](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#filter) array* |   |

### AuditlogInventory

Defines the Schema for the AuditlogInventory API.

*Appears in:*
- [AuditlogInventoryList](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#auditloginventorylist)

| Field | Description |
|---|---|
| `apiVersion` *string* | `logging.gdc.goog/v1` |
| `kind` *string* | `AuditlogInventory` |
| `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` *[AuditlogInventorySpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#auditloginventoryspec)* |   |
| `status` *[AuditlogInventoryStatus](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#auditloginventorystatus)* |   |

### AuditlogInventoryList

Contains a list of AuditlogInventory.

| Field | Description |
|---|---|
| `apiVersion` *string* | `logging.gdc.goog/v1` |
| `kind` *string* | `AuditlogInventoryList` |
| `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` *[AuditlogInventory](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#auditloginventory) array* |   |

### AuditlogInventorySpec

*Appears in:*
- [AuditlogInventory](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#auditloginventory)

| Field | Description |
|---|---|
| `oc` *string* |   |
| `apiServer` *[ApiServerEntry](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#apiserverentry) array* |   |
| `logFiles` *[LogFile](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#logfile) array* |   |
| `syslogs` *[Syslog](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#syslog) array* |   |

### AuditlogInventoryStatus

*Appears in:*
- [AuditlogInventory](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#auditloginventory)

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

### Condition

Condition defines a condition for a filter.

*Appears in:*
- [Filter](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#filter)

| Field | Description |
|---|---|
| `path` *string* |   |
| `match` *string* |   |

### ElasticOutput

Defines the Elastic output configuration.

*Appears in:*
- [SIEMDestinations](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#siemdestinations)

| Field | Description |
|---|---|
| `host` *string* | The host name of the target Elastic service. |
| `http_credential` *[HTTPCredential](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#httpcredential)* | The HTTP credential for the Elastic instance. |
| `port` *integer* | TCP port of the Elastic instance. |
| `tls` *string* |   |
| `netConnectTimeout` *integer* |   |
| `index` *string* | The index for the Elastic instance. If not specified, the log type (audit or operational) will be used. |

### Filter

Filter defines a rule for removing or replacing specific fields from audit logs. It can be used to filter sensitive information or any field irrelevant to the audit log.

*Appears in:*
- [ApiServerEntry](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#apiserverentry)

| Field | Description |
|---|---|
| `name` *string* |   |
| `action` *string* |   |
| `targetPath` *string* |   |
| `conditions` *[Condition](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#condition) array* |   |

### HTTPCredential

Defines the HTTP credential for the Elastic SIEM.

*Appears in:*
- [ElasticOutput](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#elasticoutput)

| Field | Description |
|---|---|
| `http_user` *string* | HTTP user for the Elastic instance |
| `http_passwd` *string* | HTTP password for the Elastic instance |

### LogFile

LogFile represents a log file configuration.

*Appears in:*
- [AuditlogInventorySpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#auditloginventoryspec)

| Field | Description |
|---|---|
| `name` *string* |   |
| `path` *string* |   |

### LoggingRule

Defines the Schema for the Logging Rules API.

*Appears in:*
- [LoggingRuleList](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#loggingrulespec)* |   |
| `status` *[LoggingRuleStatus](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#recordrule) array* | The list of record rules. |
| `alertRules` *[AlertRule](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#loggingtargetspec)* |   |
| `status` *[LoggingTargetStatus](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#loggingtarget)

| Field | Description |
|---|---|
| `selector` *[LoggingTargetSelectors](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#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. |

### SIEMDestinations

SIEMDestinations defines the possible SIEM destination configurations.
Users must specify outputs under `splunk` or `elastic` fields.

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

| Field | Description |
|---|---|
| `splunkOutputs` *[SplunkOutput](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#splunkoutput) array* | Splunk defines a list of Splunk destination configurations. |
| `elasticOutputs` *[ElasticOutput](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#elasticoutput) array* | Elastic defines a list of Elastic destination configurations. |

### 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/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#siemorgforwarderspec)* |   |
| `status` *[SIEMOrgForwarderStatus](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#siemorgforwarder)

| Field | Description |
|---|---|
| `source` *LogType* | The type of logs to export to a SIEM destination. Accepted values are `operational` and `audit`. |
| `destinations` *[SIEMDestinations](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#siemdestinations)* | Destinations specifies the SIEM output configurations. Current available destinations are Splunk and Elastic |
| `splunkOutputs` *[SplunkOutput](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#splunkoutput) array* | TODO (b/427090537): This field is to support the backward compatibility To be removed in 1.17 |

### SIEMOrgForwarderStatus

Defines the observed state of the `SIEMOrgForwarder` resource.

*Appears in:*
- [SIEMOrgForwarder](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#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:*
- [SIEMDestinations](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#siemdestinations)
- [SIEMOrgForwarderSpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#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/gdcag/apis/service/logging/v1/logging-v1.md.txt#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. |

### Syslog

Syslog represents a syslog configuration.

*Appears in:*
- [AuditlogInventorySpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/apis/service/logging/v1/logging-v1.md.txt#auditloginventoryspec)

| Field | Description |
|---|---|
| `name` *string* |   |
| `auditLoggingTargetName` *string* |   |
| `auditLoggingTargetNamespace` *string* |   |

### Token

Defines the token configuration for the SIEM export.

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

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