Skip to content

Retailogists/gcp-ops-bot

gcp-ops-bot

gcp-ops-bot is a Python-based monitoring utility for Google Cloud Platform (GCP) resources. It leverages Application Default Credentials (ADC) and various GCP APIs to inspect service accounts, compute instances (VMs), monitoring metrics, and logs.

Optionally, it integrates with Google GenAI to provide natural-language insights and interpretations of logs and metrics.


🔍 Features

  • List Custom Service Accounts — Identify non-default service accounts in a GCP project.

  • Inspect Virtual Machines — List and describe VMs in a given zone.

  • Fetch Monitoring Metrics — Query recent CPU, memory, and performance metrics.

  • Retrieve GCP Logs — Pull logs from Cloud Logging for specific resources and timeframes.

  • GenAI Integration (Optional) — Use Google GenAI to interpret logs and metrics in plain English.


🚀 Quick Start

Run the bot:

python main.py

You’ll see:

GCP Monitoring Bot started. Type 'q', 'quit', or 'exit' to stop.
--------------------------------------------------
User :>

Then type natural-language prompts like:

List all VMs in us-central1-a

📚 Full Documentation

Visit the Wiki for detailed guides:


Environment Variables

Create a .env file using .env.example:

GENAI_API_KEY=your_genai_api_key     # Optional if not using GenAI
GCP_PROJECT_ID=your_project_id
GCP_PROJECT_NUMBER=your_project_number
GCP_REGION=your_region_here
GCP_ZONE=your_zone_here

🤝 Contributing

We welcome contributions of all kinds!

  • Fork the repo, create a branch, and submit a pull request.
  • See CONTRIBUTING.md for guidelines.

📄 License

This project is licensed under the MIT License.

About

AI driven monitoring and telemetry for GCP

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages