Aller au contenu
Skillpedia
Déploiement et cloud (DevOps)22k · #10238

cloud-logging-finops

Ce qu’il fait

Cette skill vérifie combien un projet Google Cloud dépense pour les journaux et d'où vient cette dépense. Elle s'adresse aux équipes qui veulent réduire leur facture de journalisation.

Quand l’utiliser

  • ✓Quand vous voulez savoir pourquoi vos coûts Cloud Logging sont élevés.
  • ✓Quand vous avez besoin d'un rapport FinOps sur les buckets de journaux, les exports et le volume de journaux d'un projet.
  • ✓Quand vous voulez des filtres d'exclusion prêts à copier pour réduire les entrées de journaux inutiles.

Lien du skill

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

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/google/skills/blob/main/skills/cloud/cloud-logging-finops/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Ma facture de journalisation Google Cloud a grimpé ce mois-ci. Trouve ce qui la provoque et propose comment la réduire.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

Elle trouve l'export de facturation, lit les métriques de volume des journaux et les exports, puis les associe aux services et aux niveaux de gravité qui génèrent le plus de journaux. Elle rédige ensuite un rapport avec des graphiques et des filtres d'exclusion suggérés.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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

Questions fréquentes

Modifie-t-elle mes réglages de journalisation ?

Elle rédige le rapport et les filtres pour que vous les copiiez, donc c'est vous qui décidez de les appliquer.

Quel projet audite-t-elle ?

Elle audite un seul projet, celui que vous indiquez ou votre projet gcloud actif.

A-t-elle besoin de l'export de facturation ?

Oui. Elle demande une fois où se trouve votre export Cloud Billing, afin de rapprocher les coûts du volume de journaux.

Détails

Description originale de l’auteur

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

Popularité

Étoiles GitHub
22k
Position au classement
#10238
Licence
Apache-2.0
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires