Skip to content

to_google_cloud_logging

Sends events to Google Cloud Logging.

to_google_cloud_logging log_id=string, [project=string, organization=string,
billing_account=string, folder=string,] [resource_type=string,
resource_labels=record, payload=string, severity=string,
timestamp=time, service_credentials=string, batch_timeout=duration,
max_batch_size=int]

Sends events to Google Cloud Logging.

ID to associated the ingested logs with. It must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters, forward-slash, underscore, hyphen, and period.

A project id to associated the ingested logs with.

An organization id to associated the ingested logs with.

A billing account id to associated the ingested logs with.

A folder id to associated the ingested logs with.

The type of the monitored resource. All available types with their associated labels are listed here.

Defaults to global.

Record of associated labels for the resource. Values of the record must be of type string.

Consult the official docs for available types with their associated labels.

The log entry payload. If unspecified, the incoming event is serialised as JSON and sent.

JSON credentials to use if using a service account.

Severity of the event. Consult the official docs for available severity levels.

Defaults to default.

Timestamp of the event.

Maximum interval between sending the events.

Defaults to 5s.

Maximum events to batch before sending.

Defaults to 1k.

Send logs, authenticating automatically via ADC

Section titled “Send logs, authenticating automatically via ADC”
from {
content: "log message",
timestamp: now(),
}
to_google_cloud_logging log_id="LOG_ID", project="PROJECT_ID"
from {
content: "totally not a made up log",
timestamp: now(),
resource: "global",
}
to_google_cloud_logging log_id="LOG_ID", project="PROJECT_ID"
resource_type=resource,
service_credentials=file_contents("/path/to/credentials.json")

to_google_secops

Last updated: