cloud-logging
🐉 Skill for interacting with and analyzing Google Cloud Logging and Error Reporting. Use this when you need to process large JSON logs from GCP or convert them to Apache format for easier analysis.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-12
- Stars
- ★ 131
- Forks
- 9
01 前言 Front Matter
- name
- cloud-logging
- metadata
- { "author": "Riccardo Carlesso", "status": "published", "version": "0.3.0" }
- description
- 🐉 Skill for interacting with and analyzing Google Cloud Logging and Error Reporting. Use this when you need to process large JSON logs from GCP or convert them to Apache format for easier analysis.
02 资源文件 4
- 资产文件assets/sample_logs.json1.9 KB
- 参考文档CHANGELOG.md682 B
- 脚本scripts/cloudlogging2apachelogs_test.py1.5 KB
- 脚本scripts/cloudlogging2apachelogs.py1.8 KB
03 SKILL.md 正文
Cloud Logging
This skill provides utilities for analyzing logs, errors, and system health across Google Cloud deployments.
- Prioritize Logs with
severity>= "ERROR" as they tend to be less verbose. - Constrain logs around the time of investigation (possibly going back a few hours/days to find smoking guns).
Logs DOs and DONT's
Ingesting Logs into an LMM memory can easily saturate your context.
- [BAD] DO NOT ingest big files. Antipattern:
ReadFile path/to/access_logs_raw.json.- It's ok to get raw logs, but also use
jqor scripts to read them without polluting your context window. - [GOOD] Use simple maniuplation like:
jq -r '.[] | .httpRequest.status'to get a list of statuses. - [GOOD] Reduce size with scripts such as
scripts/cloudlogging2apachelogs.py <big_logfile.json>(provided in the skill)
- It's ok to get raw logs, but also use
- [BAD] Do not call long-running calls without precautions, eg
gcloud logging read- [GOOD] Rather prepend some reasonable
timeout 60 gcloud logging read ..., or - [BEST] Use the
run_shell_commandtool withis_background: trueand poll the results being dumped to file periodically.
- [GOOD] Rather prepend some reasonable
Bundled Scripts
cloudlogging2apachelogs.py
Converts GCP Cloud Logging JSON exports into a format loosely resembling Apache Combined Log format. This is much more token-efficient for the LLM.
Usage:
python3 scripts/cloudlogging2apachelogs.py path/to/logs.json
Testing: You can verify the script works by running its test:
python3 scripts/cloudlogging2apachelogs_test.py
Bundled Assets
assets/sample_logs.json: A small sample of GCP Cloud Logging JSON for testing conversion scripts.
04 同仓库更多 Skills
safe-sre-investigator
🐉 Sets up and uses read-only Service Accounts for GCP and Kubernetes investigations using the principle of least privilege, and provides risk assessments for suggested commands. Use when asked to investigate GCP/GKE resources or suggest gcloud/kubectl commands.
pre-publish-checker
🐉 Thoroughly checks files for profanity, internal links, sensitive paths, and professionalism before publication. Use when preparing a codebase or extension for public release.
postmortem-generator
🐉 Creates a PostMortem given enough context about an incident/outage. Will guide user to timeline, action items/bugs, and finally draft a Google Doc with the results.
postmortem-aggregator
🐉 To be used when you have a folder containing N Post Mortem files. This will help crunch data and maintain/update a POMO_AGGREGATED.md file.
monitoring-graphs
🐉 Skill for generating high-quality, annotated incident graphs for post-mortems using Python. Use this when the user needs to visualize an outage, show error rates, or correlate metrics with incident milestones.
investigation-entrypoint
🐉 The primary entrypoint for investigating production outages, orchestrating SRE response, and mitigating incidents on Google Cloud Platform (GKE, Cloud Run, etc.). Start here when an incident occurs.