Get the FREE Ultimate OpenClaw Setup Guide →

Logging List

Scanned
npx machina-cli add skill yu-iskw/google-cloud-observability-plugin/logging-list --openclaw
Files (1)
SKILL.md
788 B

Logs List

List available log names in the project.

Purpose

Discovery of which logs are available to help refine search filters.

Inputs

  • project (optional): The Google Cloud project ID to list logs from.
  • bucket (optional): List logs in a specific log bucket.
  • view (optional): List logs in a specific log view.

Behavior

  1. Execute gcloud logging logs list --project=[PROJECT] --format=json.
  2. If project is not provided, use the active project from gcp-context.
  3. If bucket or view is provided, append the respective flags.
  4. Optionally filter for specific log types if needed by the caller.

Output

Returns a JSON list of log names.

References

Source

git clone https://github.com/yu-iskw/google-cloud-observability-plugin/blob/main/skills/logging-list/SKILL.mdView on GitHub

Overview

Logs List discovers which logs exist in a project (or bucket), helping you refine search filters. It uses the gcloud command to enumerate log names and returns a JSON list for easy automation and targeted querying.

How This Skill Works

The skill executes gcloud logging logs list with --project and --format=json to retrieve log names. If a project isn’t specified, it falls back to the active project from gcp-context. You can further narrow results by supplying --bucket or --view flags; the output is a parseable JSON list of log names.

When to Use It

  • You need to discover all available logs in a Google Cloud project to plan queries.
  • You want to narrow search results by specific log names when building queries.
  • Setting up monitoring or alerts requires knowing which logs exist for policy definitions.
  • Auditing log availability before enabling log-based metrics or exports.
  • Listing logs in a particular log bucket or log view for scoped analysis.

Quick Start

  1. Step 1: Run gcloud logging logs list --project=[PROJECT] --format=json
  2. Step 2: If --project is not provided, use the active project from gcp-context
  3. Step 3: Optionally add --bucket or --view to narrow results and parse the JSON output

Best Practices

  • Specify --project when possible to avoid relying on the active context.
  • Use --format=json to get a machine-parseable output for automation.
  • Combine with --bucket or --view to scope results to a subset of logs.
  • Cache or store the returned log names to speed up repetitive searches.
  • Validate results against the Cloud Logging API if you need richer metadata.

Example Use Cases

  • Onboarding a new GCP project by enumerating all available logs before configuring log-based dashboards.
  • Narrowing a search in a SIEM by listing relevant log names and building targeted queries.
  • Auditing log availability after migrating resources to a new project to ensure coverage.
  • Listing logs within a specific log bucket to compare logs across projects.
  • Bootstrapping an automated workflow that queries logs and ingests their names into a catalog.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers