{"id":30000572,"url":"https://github.com/mr-karan/prom2grafana","last_synced_at":"2025-08-11T12:03:14.772Z","repository":{"id":308166067,"uuid":"1031850904","full_name":"mr-karan/prom2grafana","owner":"mr-karan","description":"Convert Prometheus metrics to Grafana dashboards and alert rules using AI","archived":false,"fork":false,"pushed_at":"2025-08-04T13:03:09.000Z","size":64,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-04T16:58:58.193Z","etag":null,"topics":["alerts","devops","grafana","metrics","monitoring","observability","prometheus"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mr-karan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-04T12:30:34.000Z","updated_at":"2025-08-04T14:09:48.000Z","dependencies_parsed_at":"2025-08-04T17:11:13.724Z","dependency_job_id":null,"html_url":"https://github.com/mr-karan/prom2grafana","commit_stats":null,"previous_names":["mr-karan/prom2grafana"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mr-karan/prom2grafana","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fprom2grafana","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fprom2grafana/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fprom2grafana/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fprom2grafana/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mr-karan","download_url":"https://codeload.github.com/mr-karan/prom2grafana/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mr-karan%2Fprom2grafana/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268837795,"owners_count":24314982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alerts","devops","grafana","metrics","monitoring","observability","prometheus"],"created_at":"2025-08-05T05:11:33.792Z","updated_at":"2025-08-05T05:11:38.850Z","avatar_url":"https://github.com/mr-karan.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prom2grafana\n\nA web application that intelligently converts raw Prometheus metrics into production-ready Grafana dashboards and alert rules using AI.\n\n## Features\n\n- 🚀 **Instant Conversion** - Paste Prometheus metrics, get a complete Grafana dashboard\n- 🎯 **Smart Panel Generation** - AI creates appropriate visualizations for each metric type\n- ⚡ **Alert Rules** - Automatically generates Prometheus alert rules based on metrics\n- 🎨 **Clean UI** - Minimal, focused interface with real-time conversion\n- 📋 **Export Ready** - Copy JSON directly or download dashboard files\n\n## Demo\n\n🚀 **[Try it live at prom2grafana.mrkaran.dev](https://prom2grafana.mrkaran.dev/)**\n\n![prom2grafana demo](demo.gif)\n\n## Installation\n\n### Using Go\n\n```bash\ngo install github.com/mr-karan/prom2grafana@latest\n```\n\n### Using Docker\n\n```bash\ndocker run -p 8080:8080 -e OPENAI_API_KEY=your_key ghcr.io/mr-karan/prom2grafana\n```\n\n### From Source\n\n```bash\ngit clone https://github.com/mr-karan/prom2grafana.git\ncd prom2grafana\ngo mod download\ngo build -o prom2grafana\n```\n\n## Usage\n\n1. Set your OpenRouter API key:\n   ```bash\n   export OPENAI_API_KEY=your_openrouter_api_key\n   ```\n\n2. Run the server:\n   ```bash\n   ./prom2grafana\n   ```\n\n3. Open http://localhost:8080 in your browser\n\n4. Paste your Prometheus metrics and click \"Generate Dashboard\"\n\n5. Copy the generated Grafana dashboard JSON and import it into Grafana\n\n## Configuration\n\nThe application can be configured using environment variables:\n\n- `OPENAI_API_KEY` - Your OpenRouter API key (required)\n- `PORT` - Server port (default: 8080)\n- `LOG_LEVEL` - Log level: debug, info, warn, error (default: info)\n\n## Example Input\n\n```\n# HELP node_cpu_seconds_total Seconds the CPUs spent in each mode.\n# TYPE node_cpu_seconds_total counter\nnode_cpu_seconds_total{cpu=\"0\",mode=\"idle\"} 425836.82\nnode_cpu_seconds_total{cpu=\"0\",mode=\"iowait\"} 52.34\n\n# HELP node_memory_MemAvailable_bytes Memory information field MemAvailable_bytes.\n# TYPE node_memory_MemAvailable_bytes gauge\nnode_memory_MemAvailable_bytes 1.648762880e+10\n```\n\n## Development\n\n```bash\n# Install dependencies\ngo mod tidy\n\n# Run with hot reload\nair\n\n# Run tests\ngo test ./...\n\n# Build\njust build\n\n# Release\njust release\n```\n\n## Tech Stack\n\n- **Backend**: Go with net/http\n- **Frontend**: Vanilla HTML/CSS/JS\n- **AI**: Google Gemini 2.0 Flash via OpenRouter\n- **Deployment**: Single binary with embedded assets\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details\n\n## Author\n\n[mr-karan](https://github.com/mr-karan)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmr-karan%2Fprom2grafana","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmr-karan%2Fprom2grafana","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmr-karan%2Fprom2grafana/lists"}