본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)22k · #10238

cloud-logging-finops

하는 일

이 스킬은 Google Cloud 프로젝트가 로그에 얼마를 쓰는지, 그 지출이 어디서 오는지 확인합니다. 로깅 요금을 낮추려는 팀을 위한 스킬입니다.

사용하는 경우

  • ✓Cloud Logging 비용이 왜 높은지 알아내고 싶을 때.
  • ✓프로젝트의 로그 버킷, 싱크, 로그 양에 대한 FinOps 보고서가 필요할 때.
  • ✓필요 없는 로그 항목을 줄이는 복사해서 쓸 수 있는 제외 필터를 원할 때.

스킬 링크

https://github.com/google/skills/blob/main/skills/cloud/cloud-logging-finops/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/google/skills/blob/main/skills/cloud/cloud-logging-finops/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이번 달 Google Cloud 로깅 요금이 크게 올랐어요. 원인을 찾고 줄이는 방법을 제안해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

Cloud Billing 내보내기 파일을 찾고, 로그 양 지표와 싱크를 읽습니다. 그다음 가장 많은 로그를 만드는 서비스와 심각도를 찾아 맞춥니다. 마지막으로 차트와 제외 필터 제안이 담긴 보고서를 작성합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Cloud Logging Finops

Non-interactive runs. When no user can answer (e.g. a scheduled or automated run), ask nothing: audit the project named in the request, or the active gcloud project; use --billing-mode=search; cover all five report topics (Step 2.5); and never enable an API or upgrade a log bucket. Put anything that needed a user (a disabled API, a missing role, the upgrade advisory) in the report instead.

Usage Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution.

Step 0: Locate the Cloud Billing Export

The audit covers one Google Cloud project, {project_id}: the project the user names or, if they don't name one, the active gcloud project (gcloud config get project), confirmed with the user.

Discover everything else (log buckets, Observability Analytics, sinks, exclusions, metrics) yourself; never ask the user about those. The billing export is the exception: finding it unaided can mean scanning every project on the billing account, so ask once, before running anything, and don't start a search until the user has chosen answer 3 (single-select, using the host's question tool if it has one):

Do you know where the Cloud Billing export for {project_id} is?

  1. Yes — here it is (the BigQuery table ID project.dataset.table, or just the project and dataset)
  2. There's no billing export for this project
  3. No / not sure — search for it (seconds on a small project; on a large billing account it can take a long time)
Answer Flags Cost figures
1 --billing-mode=explicit plus --billing-table (or --billing-project/--billing-dataset) invoiced
2 --billing-mode=none list-price estimates
3 --billing-mode=search (default) invoiced if found, else estimates

Answer 3's search has no time limit: it checks {project_id} first (usually under 10 s, 1–2 min with many tables), then every project on its billing account (can take many minutes; progress prints every 30 s). Tell the user this before launching. If the wait is unacceptable, offer to switch to answer 1 (they look up the table) or answer 2 (skip the export and use list-price estimates). Don't suggest setting up an export to make the search faster.

If the search found an export, tell the user: "Next time, pass --billing-table=<table> and discovery drops to about two seconds."

Step 1: Environment Setup

Check these prerequisites before Step 2; fix only what is missing:

  • gcloud: if gcloud is not installed, follow https://docs.cloud.google.com/sdk/docs/install-sdk.md.txt.
  • Project: run gcloud config get project; if it isn't {project_id} (from Step 0), run gcloud config set project {project_id}.
  • Credentials: the scripts use Application Default Credentials. Run gcloud auth application-default login, or set GOOGLE_APPLICATION_CREDENTIALS to a service account key.
  • Billing: the project must have an active billing account attached.
  • APIs: don't enable APIs up front; the Logging, Monitoring, BigQuery and Observability APIs are on by default in new projects. Only if the collector reports an API as disabled (SERVICE_DISABLED, "has not been used in project"), name it, ask the user, and on approval run gcloud services enable {api} --project={project_id} (tagged as described below):
    • logging, monitoring: required; without them there is nothing to audit.
    • bigquery: invoiced costs from the billing export.
    • observability: resolves the project's default log scope, so log samples match what Logs Explorer shows.
    • cloudasset, cloudbilling: only answer 3's search across the billing account.

IAM roles for the identity running the audit. The skill never grants roles: the scripts run with the user's own credentials and read only what those credentials can. When a step fails on permissions, its advisory names the step; tell the user which role below it needs:

Role

자주 묻는 질문

로그 설정을 바꾸나요?

보고서와 필터를 복사해서 쓸 수 있게 작성하므로, 적용할지는 사용자가 정합니다.

어떤 프로젝트를 점검하나요?

지정한 프로젝트 또는 현재 활성화된 gcloud 프로젝트 하나를 점검합니다.

결제 내보내기가 필요한가요?

네. 비용과 로그 양을 맞춰 보려면 Cloud Billing 내보내기 위치를 한 번 알려 주어야 합니다.

상세 정보

작성자의 원본 설명

Audits Cloud Logging costs for a Google Cloud project: the charges for log entries written to log buckets, the services, log streams and severities that drive them, and the log sinks that route them. Reconciles Cloud Billing export costs with Cloud Monitoring volume metrics, and generates a FinOps report with charts and copy-paste exclusion filters. Use when auditing Cloud Logging spend, finding logging waste, identifying top logging contributors, generating log cost reduction reports, or creating log sink exclusion filters. Don't use for querying log entries (use cloud-logging-query-generatio

repo: google/skills

인기도

GitHub 스타
22k
순위
#10238
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬