steampipe plugin install gcp

Table: gcp_logging_sink - Query GCP Logging Sinks using SQL

Google Cloud Logging Sinks are mechanisms in Google Cloud Platform (GCP) that allow you to route log entries from logging services to a variety of supported destinations. These destinations can be Cloud Storage buckets, Pub/Sub topics, or BigQuery datasets. Logging sinks give you the flexibility to manage, analyze, and act on your log data as you see fit.

Table Usage Guide

The gcp_logging_sink table provides insights into Logging Sinks within Google Cloud Platform (GCP). As a cloud engineer, you can explore sink-specific details through this table, including the destination, filter, and exclusion details. Utilize it to uncover information about sinks, such as their configured destinations, the filters applied, and to verify if any exclusions are set.

Examples

List writer identity that writes the export logs of logging sink

Identify the unique identities responsible for writing export logs in your logging sink. This can help monitor and manage who is contributing to your logs, enhancing security and accountability.

select
name,
unique_writer_identity
from
gcp_logging_sink;
select
name,
unique_writer_identity
from
gcp_logging_sink;

List the destination path for each sink

Explore which logging sinks are directing data to specific destinations in your Google Cloud Platform. This can help you understand where your log data is being sent and ensure it's reaching the intended targets.

select
name,
destination
from
gcp_logging_sink;
select
name,
destination
from
gcp_logging_sink;

Schema for gcp_logging_sink

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
create_timetimestamp with time zoneThe creation timestamp of the sink
descriptiontextA user-specified, human-readable description of the sink
destinationtextSpecifies the destination, in which the logs will be exported
disabledbooleanSpecifies whether the sink is disabled, or not
exclusionsjsonbA list of exclusion filters. Log entries that match any of the exclusion filters will not be exported.
filtertextAn advanced logs filter. The log entries which will match the filter, will be exported.
include_childrenbooleanSpecifies whether a particular log entry from the children is exported depends on the sink's filter expression
locationtextThe GCP multi-region, region, or zone in which the resource is located.
nametext=The client-assigned sink identifier, unique within the project
projecttextThe GCP Project in which the resource is located.
self_linktextServer-defined URL for the resource.
titletextTitle of the resource.
unique_writer_identitytextAn IAM identity—a service account or group—under which Logging writes the exported log entries to the sink's destination
update_timetimestamp with time zoneThe last update timestamp of the sink

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- gcp

You can pass the configuration to the command with the --config argument:

steampipe_export_gcp --config '<your_config>' gcp_logging_sink